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 {
29
29
NSInvocation *inv = [NSInvocation invocationWithMethodSignature: [[InstabugFlutterPlugin class ] methodSignatureForSelector: method]];
30
30
[inv setSelector: method];
31
31
[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];
36
41
[inv setArgument: &(arg) atIndex: index];
37
42
index++;
38
43
}
You can’t perform that action at this time.
0 commit comments