From 56951c9efbffcaaa99d4534a8a6e51fe6b047f57 Mon Sep 17 00:00:00 2001 From: Desu Sai Venkat Date: Fri, 2 Jul 2021 18:49:38 +0530 Subject: [PATCH 1/2] Reset Traits on Successive Identify calls with Different UserId's --- Rudder/RSContext.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Rudder/RSContext.m b/Rudder/RSContext.m index 5cb3ee79..8f56a9f9 100644 --- a/Rudder/RSContext.m +++ b/Rudder/RSContext.m @@ -89,6 +89,14 @@ - (void)updateTraits:(RSTraits *)traits { [_traits removeAllObjects]; } + NSString* existingId = (NSString*)[_traits objectForKey:@"userId"]; + NSString* userId = (NSString*) traits.userId; + + if(existingId!=nil && userId!=nil && ![existingId isEqual:userId]) + { + _traits = [[traits dict]mutableCopy]; + return; + } [_traits setValuesForKeysWithDictionary:[traits dict]]; } From a49ea219af3bb693bcd3714c166f5ddeef257a4d Mon Sep 17 00:00:00 2001 From: Desu Sai Venkat Date: Mon, 5 Jul 2021 16:12:03 +0530 Subject: [PATCH 2/2] Bumped Version to 1.0.20 --- README.md | 4 ++-- Rudder.podspec | 4 ++-- Rudder/RSConstants.m | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 875a14eb..386f36b2 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.19' +pod 'Rudder', '1.0.20' ``` ### Carthage And for Carthage support add the following line to your `Cartfile` ```xcode -github "rudderlabs/rudder-sdk-ios" "v1.0.19" +github "rudderlabs/rudder-sdk-ios" "v1.0.20" ``` 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 17be3962..4ffa20ce 100644 --- a/Rudder.podspec +++ b/Rudder.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Rudder' - s.version = "1.0.19" + s.version = "1.0.20" 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.19" } + s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-ios.git", :tag => "v1.0.20" } s.ios.deployment_target = '8.0' diff --git a/Rudder/RSConstants.m b/Rudder/RSConstants.m index 2f31afc5..510c17de 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.19"; +NSString *const RS_VERSION = @"1.0.20"; @end