diff options
author | Brad Leege <bleege@gmail.com> | 2015-05-26 14:24:02 -0700 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-05-26 14:24:02 -0700 |
commit | d0864d719b611ce759a9f0f0dfc7207886b49a37 (patch) | |
tree | 36c5ca5da11e001a46b28e61485c8f1347bb0e39 /platform | |
parent | ad0a2af6b5f3231de4832f22b905df44eb35e538 (diff) | |
download | qtlocation-mapboxgl-d0864d719b611ce759a9f0f0dfc7207886b49a37.tar.gz |
#1641 - Changing version to a static constant instead of a property
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index a178e86c96..e7f400c5dc 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -13,6 +13,7 @@ #include <sys/sysctl.h> +static const NSUInteger version = 1; static NSString *const MGLMapboxEventsUserAgent = @"MapboxEventsiOS/1.0"; static NSString *MGLMapboxEventsAPIBase = @"https://api.tiles.mapbox.com"; @@ -142,7 +143,6 @@ const NSTimeInterval MGLFlushInterval = 60; @property (atomic) NSString *appName; @property (atomic) NSString *appVersion; @property (atomic) NSString *appBuildNumber; -@property (atomic) NSNumber *version; @property (atomic) NSString *instanceID; @property (atomic) NSDateFormatter *rfc3339DateFormatter; @property (atomic) NSURLSession *session; @@ -227,7 +227,6 @@ const NSTimeInterval MGLFlushInterval = 60; _appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; _appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; _appBuildNumber = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; - _version = [NSNumber numberWithInt:1]; _instanceID = [[NSUUID UUID] UUIDString]; NSString *uniqueID = [[NSProcessInfo processInfo] globallyUniqueString]; @@ -442,7 +441,7 @@ const NSTimeInterval MGLFlushInterval = 60; @"created" : [strongSelf.rfc3339DateFormatter stringFromDate:[NSDate date]], @"appBundleId" : strongSelf.appBundleId, @"vendorId": vid, - @"version": strongSelf.version, + @"version": @(version), @"instance": strongSelf.instanceID}; // Add to Queue @@ -484,7 +483,7 @@ const NSTimeInterval MGLFlushInterval = 60; NSMutableDictionary *evt = [[NSMutableDictionary alloc] initWithDictionary:attributeDictionary]; // mapbox-events stock attributes [evt setObject:event forKey:@"event"]; - [evt setObject:strongSelf.version forKey:@"version"]; + [evt setObject:@(version) forKey:@"version"]; [evt setObject:[strongSelf.rfc3339DateFormatter stringFromDate:[NSDate date]] forKey:@"created"]; [evt setObject:strongSelf.instanceID forKey:@"instance"]; [evt setObject:strongSelf.data.advertiserId forKey:@"advertiserId"]; |