diff options
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index ce59815372..7b810d5cd5 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -59,6 +59,7 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; @property (atomic) NSString *instanceID; @property (atomic) NSString *advertiserId; @property (atomic) NSString *vendorId; +@property (atomic) NSString *appBundleId; @property (atomic) NSString *userAgent; @property (atomic) NSString *model; @property (atomic) NSString *iOSVersion; @@ -115,9 +116,9 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; [[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister]; } - NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier]; + _appBundleId = [[NSBundle mainBundle] bundleIdentifier]; NSString *uniqueID = [[NSProcessInfo processInfo] globallyUniqueString]; - _serialQueue = dispatch_queue_create([[NSString stringWithFormat:@"%@.%@.events.serial", bundleID, uniqueID] UTF8String], DISPATCH_QUEUE_SERIAL); + _serialQueue = dispatch_queue_create([[NSString stringWithFormat:@"%@.%@.events.serial", _appBundleId, uniqueID] UTF8String], DISPATCH_QUEUE_SERIAL); // Configure Events Infrastructure _eventQueue = [[NSMutableArray alloc] init]; @@ -248,6 +249,7 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; [evt setObject:weakSelf.instanceID forKey:@"instance"]; [evt setObject:weakSelf.advertiserId forKey:@"advertiserId"]; [evt setObject:weakSelf.vendorId forKey:@"vendorId"]; + [evt setObject:weakSelf.appBundleId forKeyedSubscript:@"appBundleId"]; // mapbox-events-ios stock attributes [evt setValue:[weakSelf.rfc3339DateFormatter stringFromDate:[NSDate date]] forKey:@"created"]; |