From 378a771e319fe35537b6d14186fb2a2564523d29 Mon Sep 17 00:00:00 2001 From: Richard WIndley Date: Sun, 18 Mar 2018 17:00:58 +0000 Subject: [PATCH] Fix set() methods --- src/ios/FirebaseCrashlyticsPlugin.h | 1 + src/ios/FirebaseCrashlyticsPlugin.m | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ios/FirebaseCrashlyticsPlugin.h b/src/ios/FirebaseCrashlyticsPlugin.h index cb3ffb4..c1146a1 100644 --- a/src/ios/FirebaseCrashlyticsPlugin.h +++ b/src/ios/FirebaseCrashlyticsPlugin.h @@ -12,5 +12,6 @@ - (void)setBool:(CDVInvokedUrlCommand *)command; - (void)setDouble:(CDVInvokedUrlCommand *)command; - (void)setFloat:(CDVInvokedUrlCommand *)command; +- (void)setUserIdentifier:(CDVInvokedUrlCommand *)command; @end diff --git a/src/ios/FirebaseCrashlyticsPlugin.m b/src/ios/FirebaseCrashlyticsPlugin.m index 280fec6..a65e73c 100644 --- a/src/ios/FirebaseCrashlyticsPlugin.m +++ b/src/ios/FirebaseCrashlyticsPlugin.m @@ -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