File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,15 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
2929 NSInvocation *inv = [NSInvocation invocationWithMethodSignature: [[InstabugFlutterPlugin class ] methodSignatureForSelector: method]];
3030 [inv setSelector: method];
3131 [inv setTarget: [InstabugFlutterPlugin class ]];
32- int index = 2 ;
33- NSDictionary *myDict = call.arguments ;
34- for (id key in myDict) {
35- NSObject *arg = [myDict objectForKey: key];
32+ /*
33+ * Indices 0 and 1 indicate the hidden arguments self and _cmd,
34+ * respectively; you should set these values directly with the target and selector properties.
35+ * Use indices 2 and greater for the arguments normally passed in a message.
36+ */
37+ NSInteger index = 2 ;
38+ NSDictionary *argumentsDictionary = call.arguments ;
39+ for (id key in argumentsDictionary) {
40+ NSObject *arg = [argumentsDictionary objectForKey: key];
3641 [inv setArgument: &(arg) atIndex: index];
3742 index++;
3843 }
You can’t perform that action at this time.
0 commit comments