Skip to content

Commit d0110d0

Browse files
committed
Updated migrate check
1 parent cd2d8a0 commit d0110d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

BranchSDK/BNCReferringURLUtility.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ - (NSMutableDictionary *)serializeToJson:(NSMutableDictionary<NSString *, BNCUrl
183183
//Turns an old gbraid into a new BNCUrlQueryParameter and saves it for use, then clears the old gbraid.
184184
-(void)checkForAndMigrateOldGbraid {
185185

186-
if (self.urlQueryParameters[BRANCH_REQUEST_KEY_REFERRER_GBRAID] != nil) {
186+
if (self.urlQueryParameters[BRANCH_REQUEST_KEY_REFERRER_GBRAID].value == nil) {
187187
if ([BNCPreferenceHelper sharedInstance].referrerGBRAID) {
188188
NSString *existingGbraidValue = [BNCPreferenceHelper sharedInstance].referrerGBRAID;
189189
NSTimeInterval existingGbraidValidityWindow = [BNCPreferenceHelper sharedInstance].referrerGBRAIDValidityWindow;
@@ -203,6 +203,8 @@ -(void)checkForAndMigrateOldGbraid {
203203
[BNCPreferenceHelper sharedInstance].referrerGBRAID = nil;
204204
[BNCPreferenceHelper sharedInstance].referrerGBRAIDValidityWindow = 0;
205205
[BNCPreferenceHelper sharedInstance].referrerGBRAIDInitDate = nil;
206+
207+
BNCLogDebug(@"Updated old Gbraid to new BNCUrlQueryParameter");
206208
}
207209
}
208210
}

0 commit comments

Comments
 (0)