Skip to content

Commit

Permalink
Review Comments fixes- Removed @synchronize lock and changes true/fal…
Browse files Browse the repository at this point in the history
…se to YES/NO
  • Loading branch information
NidhiDixit09 committed Feb 14, 2024
1 parent 6a61813 commit ecb5e3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 5 additions & 5 deletions BranchSDK/BNCPreferenceHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -801,16 +801,16 @@ - (void) setInvokeRegisterApp:(BOOL)invoke {
- (BOOL) eeaRegionInitialized {
@synchronized(self) {
if([self readObjectFromDefaults:BRANCH_PREFS_KEY_DMA_EEA])
return true;
return false;
return YES;
return NO;
}
}

- (BOOL) eeaRegion {
@synchronized(self) {
NSNumber *b = (id) [self readObjectFromDefaults:BRANCH_PREFS_KEY_DMA_EEA];
if ([b isKindOfClass:NSNumber.class]) return [b boolValue];
return false;
return NO;
}
}

Expand All @@ -825,7 +825,7 @@ - (BOOL) adPersonalizationConsent {
@synchronized(self) {
NSNumber *b = (id) [self readObjectFromDefaults:BRANCH_PREFS_KEY_DMA_AD_PERSONALIZATION];
if ([b isKindOfClass:NSNumber.class]) return [b boolValue];
return false;
return NO;
}
}

Expand All @@ -840,7 +840,7 @@ - (BOOL) adUserDataUsageConsent {
@synchronized(self) {
NSNumber *b = (id) [self readObjectFromDefaults:BRANCH_PREFS_KEY_DMA_AD_USER_DATA];
if ([b isKindOfClass:NSNumber.class]) return [b boolValue];
return false;
return NO;
}
}

Expand Down
8 changes: 3 additions & 5 deletions BranchSDK/Branch.m
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,9 @@ + (void)setReferrerGbraidValidityWindow:(NSTimeInterval)validityWindow{
}

+ (void) setDMAParamsForEEA:(BOOL)eeaRegion AdPersonalizationConsent:(BOOL)adPersonalizationConsent AdUserDataUsageConsent:(BOOL)adUserDataUsageConsent{
@synchronized(self) {
[BNCPreferenceHelper sharedInstance].eeaRegion = eeaRegion;
[BNCPreferenceHelper sharedInstance].adPersonalizationConsent = adPersonalizationConsent;
[BNCPreferenceHelper sharedInstance].adUserDataUsageConsent = adUserDataUsageConsent;
}
[BNCPreferenceHelper sharedInstance].eeaRegion = eeaRegion;
[BNCPreferenceHelper sharedInstance].adPersonalizationConsent = adPersonalizationConsent;
[BNCPreferenceHelper sharedInstance].adUserDataUsageConsent = adUserDataUsageConsent;
}

#pragma mark - InitSession Permutation methods
Expand Down

0 comments on commit ecb5e3b

Please sign in to comment.