Skip to content

Commit 8f114a7

Browse files
committed
✨ [IOS] Added startWithToken API
1 parent 748295e commit 8f114a7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ios/Classes/InstabugFlutterPlugin.m

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,14 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
4343
}
4444
}
4545

46-
NSString *token = call.arguments[@"token"];
47-
46+
47+
+ (void)startWithToken:(NSString *)token invocationEvents:(NSArray*)invocationEventsArray {
48+
NSDictionary *invocationEventsMap = [self constants];
4849
NSInteger invocationEvents = IBGInvocationEventNone;
49-
for (NSString * invocationEvent in call.arguments[@"invocationEvents"]) {
50+
for (NSString * invocationEvent in invocationEventsArray) {
5051
invocationEvents |= ((NSNumber *) invocationEventsMap[invocationEvent]).integerValue;
5152
}
52-
5353
[Instabug startWithToken:token invocationEvents:invocationEvents];
54-
result(nil);
55-
} else {
56-
result(FlutterMethodNotImplemented);
57-
}
5854
}
5955

6056
@end

0 commit comments

Comments
 (0)