mirror of
https://github.com/caoer/analytics-ios-integration-firebase.git
synced 2026-04-30 13:52:29 +08:00
escape spaces in user traits
This commit is contained in:
@@ -23,7 +23,8 @@
|
|||||||
- (void)viewDidLoad
|
- (void)viewDidLoad
|
||||||
{
|
{
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
// Do any additional setup after loading the view, typically from a nib.
|
// Do any additional setup after loading the view, typically from a nib.
|
||||||
|
[[SEGAnalytics sharedAnalytics] identify:@"123abc" traits:@{@"name":@"fred", @"gender":@"male"}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)didReceiveMemoryWarning
|
- (void)didReceiveMemoryWarning
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
[payload.traits enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop){
|
[payload.traits enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop){
|
||||||
NSString *trait = key;
|
NSString *trait = [key stringByReplacingOccurrencesOfString:@" " withString:@"_"];
|
||||||
NSString *value = obj;
|
NSString *value = [obj stringByReplacingOccurrencesOfString:@" " withString:@"_"];
|
||||||
[FIRAnalytics setUserPropertyString:value forName:trait];
|
[FIRAnalytics setUserPropertyString:value forName:trait];
|
||||||
SEGLog(@"[FIRAnalytics setUserPropertyString:%@ forName:%@]", value, trait);
|
SEGLog(@"[FIRAnalytics setUserPropertyString:%@ forName:%@]", value, trait);
|
||||||
}];
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user