diff options
author | Brad Leege <bleege@gmail.com> | 2015-03-27 12:49:28 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-03-27 12:49:28 -0500 |
commit | caf970eab72fbcc21a48c0ed6ccfbce2458bd224 (patch) | |
tree | 811b680d3d897f5e891f365980f163b51c2638ae | |
parent | e66e3c40050728c5d96c692003e87b675a9ef10b (diff) | |
parent | b01aef1c7b23a308915c12b1db66e712fef5d7de (diff) | |
download | qtlocation-mapboxgl-caf970eab72fbcc21a48c0ed6ccfbce2458bd224.tar.gz |
Merge pull request #1138 from mapbox/1124-both-ids-take-2
Resplitting anonid into advertiserId and vendorId
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 94374b9da9..d3015056b3 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -57,7 +57,8 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; @property (atomic) NSString *appName; @property (atomic) NSString *appVersion; @property (atomic) NSString *instanceID; -@property (atomic) NSString *anonID; +@property (atomic) NSString *advertiserId; +@property (atomic) NSString *vendorId; @property (atomic) NSString *userAgent; @property (atomic) NSString *model; @property (atomic) NSString *iOSVersion; @@ -126,6 +127,7 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; _instanceID = [[NSUUID UUID] UUIDString]; // Dynamic detection of ASIdentifierManager from Mixpanel // https://github.com/mixpanel/mixpanel-iphone/blob/master/LICENSE + _advertiserId = @""; Class ASIdentifierManagerClass = NSClassFromString(@"ASIdentifierManager"); if (ASIdentifierManagerClass) { SEL sharedManagerSelector = NSSelectorFromString(@"sharedManager"); @@ -136,13 +138,10 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; if (trackingEnabled) { SEL advertisingIdentifierSelector = NSSelectorFromString(@"advertisingIdentifier"); NSUUID *uuid = ((NSUUID* (*)(id, SEL))[sharedManager methodForSelector:advertisingIdentifierSelector])(sharedManager, advertisingIdentifierSelector); - _anonID = [uuid UUIDString]; - } else { - _anonID = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; + _advertiserId = [uuid UUIDString]; } - } else { - _anonID = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; } + _vendorId = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; _model = [self getSysInfoByName:"hw.machine"]; _iOSVersion = [NSString stringWithFormat:@"%@ %@", [UIDevice currentDevice].systemName, [UIDevice currentDevice].systemVersion]; @@ -263,7 +262,8 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; [evt setObject:@(1) forKey:@"version"]; [evt setObject:[weakSelf formatDate:[NSDate date]] forKey:@"created"]; [evt setObject:weakSelf.instanceID forKey:@"instance"]; - [evt setObject:weakSelf.anonID forKey:@"anonid"]; + [evt setObject:weakSelf.advertiserId forKey:@"advertiserId"]; + [evt setObject:weakSelf.vendorId forKey:@"vendorId"]; // mapbox-events-ios stock attributes [evt setValue:[weakSelf.rfc3339DateFormatter stringFromDate:[NSDate date]] forKey:@"created"]; |