Skip to content

Commit

Permalink
Fix set() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ReallySmallSoftware committed Mar 18, 2018
1 parent 18cf65f commit 378a771
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ios/FirebaseCrashlyticsPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
- (void)setBool:(CDVInvokedUrlCommand *)command;
- (void)setDouble:(CDVInvokedUrlCommand *)command;
- (void)setFloat:(CDVInvokedUrlCommand *)command;
- (void)setUserIdentifier:(CDVInvokedUrlCommand *)command;

@end
12 changes: 9 additions & 3 deletions src/ios/FirebaseCrashlyticsPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,27 @@ - (void)setBool:(CDVInvokedUrlCommand *)command {
NSString *key = [command argumentAtIndex:0];
NSNumber *value = [command argumentAtIndex:1];

[CrashlyticsKit setIntValue:[value boolValue] forKey:key];
[CrashlyticsKit setBoolValue:[value boolValue] forKey:key];
}

- (void)setDouble:(CDVInvokedUrlCommand *)command {
NSString *key = [command argumentAtIndex:0];
NSNumber *value = [command argumentAtIndex:1];

[CrashlyticsKit setIntValue:[value doubleValue] forKey:key];
[CrashlyticsKit setFloatValue:[value doubleValue] forKey:key];
}

- (void)setFloat:(CDVInvokedUrlCommand *)command {
NSString *key = [command argumentAtIndex:0];
NSNumber *value = [command argumentAtIndex:1];

[CrashlyticsKit setIntValue:[value floatValue] forKey:key];
[CrashlyticsKit setFloatValue:[value floatValue] forKey:key];
}

- (void)setUserIdentifier:(CDVInvokedUrlCommand *)command {
NSString *identifier = [command argumentAtIndex:0];

[CrashlyticsKit setUserIdentifier:identifier];
}

@end

0 comments on commit 378a771

Please sign in to comment.