diff --git a/Example/Tests/Tests.m b/Example/Tests/Tests.m index e22d5b4..29c410b 100644 --- a/Example/Tests/Tests.m +++ b/Example/Tests/Tests.m @@ -36,7 +36,7 @@ } context:@{} integrations:@{}]; [integration identify:payload]; [verify(mockFirebase) setUserID:@"7891"]; - [verify(mockFirebase) setUserPropertyString:@"Jerry_Seinfield" forName: @"name"]; + [verify(mockFirebase) setUserPropertyString:@"Jerry Seinfield" forName: @"name"]; [verify(mockFirebase) setUserPropertyString:@"male" forName: @"gender"]; [verify(mockFirebase) setUserPropertyString:@"confused" forName: @"emotion"]; [verify(mockFirebase) setUserPropertyString:@"47" forName: @"age"]; diff --git a/Segment-Firebase/Classes/SEGFirebaseIntegration.m b/Segment-Firebase/Classes/SEGFirebaseIntegration.m index ccbf3f7..6fa8105 100644 --- a/Segment-Firebase/Classes/SEGFirebaseIntegration.m +++ b/Segment-Firebase/Classes/SEGFirebaseIntegration.m @@ -42,7 +42,7 @@ - (void)identify:(SEGIdentifyPayload *)payload NSDictionary *mappedTraits = [SEGFirebaseIntegration mapToStrings:payload.traits]; [mappedTraits enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop){ NSString *trait = [key stringByReplacingOccurrencesOfString:@" " withString:@"_"]; - NSString *value = [obj stringByReplacingOccurrencesOfString:@" " withString:@"_"]; + NSString *value = [obj stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; [self.firebaseClass setUserPropertyString:value forName:trait]; SEGLog(@"[FIRAnalytics setUserPropertyString:%@ forName:%@]", value, trait); }];