Skip to content

Commit

Permalink
fix(firebase_in_app_messaging): issue where Boolean value was always …
Browse files Browse the repository at this point in the history
…`true` for `setMessagesSuppressed ()` & `setAutomaticDataCollectionEnabled()` on iOS. (#7954)
  • Loading branch information
russellwheatley committed Jan 27, 2022
1 parent ac1c9d0 commit e397add
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
[fiam triggerEvent:eventName];
result(nil);
} else if ([@"FirebaseInAppMessaging#setMessagesSuppressed" isEqualToString:call.method]) {
NSNumber *suppress = [NSNumber numberWithBool:call.arguments[@"suppress"]];
NSNumber *suppress = [NSNumber numberWithBool:(NSNumber *)call.arguments[@"suppress"]];
FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
fiam.messageDisplaySuppressed = [suppress boolValue];
result(nil);
} else if ([@"FirebaseInAppMessaging#setAutomaticDataCollectionEnabled"
isEqualToString:call.method]) {
NSNumber *enabled = [NSNumber numberWithBool:call.arguments[@"enabled"]];
NSNumber *enabled = [NSNumber numberWithBool:(NSNumber *)call.arguments[@"enabled"]];
FIRInAppMessaging *fiam = [FIRInAppMessaging inAppMessaging];
fiam.automaticDataCollectionEnabled = [enabled boolValue];
result(nil);
Expand Down

0 comments on commit e397add

Please sign in to comment.