From ecb5e3b71167799155321faaeb597f592b9ce1f5 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:36:26 -0800 Subject: [PATCH] Review Comments fixes- Removed @synchronize lock and changes true/false to YES/NO --- BranchSDK/BNCPreferenceHelper.m | 10 +++++----- BranchSDK/Branch.m | 8 +++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/BranchSDK/BNCPreferenceHelper.m b/BranchSDK/BNCPreferenceHelper.m index 5e6e51d98..ab9e2bd74 100644 --- a/BranchSDK/BNCPreferenceHelper.m +++ b/BranchSDK/BNCPreferenceHelper.m @@ -801,8 +801,8 @@ - (void) setInvokeRegisterApp:(BOOL)invoke { - (BOOL) eeaRegionInitialized { @synchronized(self) { if([self readObjectFromDefaults:BRANCH_PREFS_KEY_DMA_EEA]) - return true; - return false; + return YES; + return NO; } } @@ -810,7 +810,7 @@ - (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; } } @@ -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; } } @@ -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; } } diff --git a/BranchSDK/Branch.m b/BranchSDK/Branch.m index 9f681e3a8..c4bdd5b04 100644 --- a/BranchSDK/Branch.m +++ b/BranchSDK/Branch.m @@ -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