diff --git a/Example/Rudder/_AppDelegate.m b/Example/Rudder/_AppDelegate.m index ed63aa38..400f55c7 100644 --- a/Example/Rudder/_AppDelegate.m +++ b/Example/Rudder/_AppDelegate.m @@ -27,6 +27,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [builder withRecordScreenViews:NO]; [RSClient getInstance:WRITE_KEY config:[builder build]]; + + // [[[RSClient sharedInstance] getContext] putDeviceToken:[self getDeviceToken]]; // [[[RSClient sharedInstance] getContext] putAdvertisementId:[self getIDFA]]; diff --git a/README.md b/README.md index 0066c937..839c2d07 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ RudderStack is available through [CocoaPods](https://cocoapods.org) and [Carthag ### CocoaPods To install it, simply add the following line to your Podfile: ```xcode -pod 'Rudder', '1.0.12' +pod 'Rudder', '1.0.13' ``` ### Carthage And for Carthage support add the following line to your `Cartfile` ```xcode -github "rudderlabs/rudder-sdk-ios" "v1.0.12" +github "rudderlabs/rudder-sdk-ios" "v1.0.13" ``` Remember to include the following code in all `.m` and `.h` files where you want to refer to or use Rudder SDK classes diff --git a/Rudder.podspec b/Rudder.podspec index 84992930..5cefd709 100644 --- a/Rudder.podspec +++ b/Rudder.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Rudder' - s.version = "1.0.12" + s.version = "1.0.13" s.summary = "Privacy and Security focused Segment-alternative. iOS SDK" s.description = <<-DESC Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly. @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.license = { :type => "Apache", :file => "LICENSE" } s.author = { "Rudderstack" => "arnab@rudderlabs.com" } s.platform = :ios, "9.0" - s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-ios.git", :tag => "v1.0.12" } + s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-ios.git", :tag => "v1.0.13" } s.ios.deployment_target = '8.0' diff --git a/Rudder/RSConstants.m b/Rudder/RSConstants.m index 8683bdee..2ae85eb5 100644 --- a/Rudder/RSConstants.m +++ b/Rudder/RSConstants.m @@ -17,5 +17,5 @@ @implementation RSConstants NSString *const RSControlPlaneUrl = @"https://api.rudderlabs.com"; bool const RSTrackLifeCycleEvents = YES; bool const RSRecordScreenViews = NO; -NSString *const RS_VERSION = @"1.0.12"; +NSString *const RS_VERSION = @"1.0.13"; @end diff --git a/Rudder/RSContext.m b/Rudder/RSContext.m index 36a821fe..e7dc0f08 100644 --- a/Rudder/RSContext.m +++ b/Rudder/RSContext.m @@ -31,7 +31,10 @@ - (instancetype)init [webView loadHTMLString:@"" baseURL:nil]; [webView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id __nullable userAgent, NSError * __nullable error) { - self->_userAgent = userAgent; + if (userAgent != NULL) { + NSLog(@"Retrieved userAgent: %@", userAgent); + self->_userAgent = userAgent; + } }]; }); _locale = [RSUtils getLocale]; @@ -142,7 +145,10 @@ - (void)updateExternalIds:(NSMutableArray *)externalIds { [tempDict setObject:[_library dict] forKey:@"library"]; [tempDict setObject:[_os dict] forKey:@"os"]; [tempDict setObject:[_screen dict] forKey:@"screen"]; - [tempDict setObject:_userAgent ?: @"unknown" forKey:@"userAgent"]; + if (_userAgent) { + [tempDict setObject:_userAgent forKey:@"userAgent"]; + } + [tempDict setObject:_locale forKey:@"locale"]; [tempDict setObject:[_device dict] forKey:@"device"]; [tempDict setObject:[_network dict] forKey:@"network"];