Skip to content

Commit e16d2ba

Browse files
committed
nit: remove getPrivacyConsent as it is no longer used
* Keeping this method is misleading, it is no longer used by anything * Instead, logic is using the `requiresUserPrivacyConsent` method instead that considers the plist value.
1 parent a1eea2b commit e16d2ba

3 files changed

Lines changed: 0 additions & 11 deletions

File tree

iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ THE SOFTWARE.
2929
@interface OSPrivacyConsentController : NSObject
3030
+ (BOOL)requiresUserPrivacyConsent;
3131
+ (void)consentGranted:(BOOL)granted;
32-
+ (BOOL)getPrivacyConsent;
3332
+ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName;
3433
+ (void)setRequiresPrivacyConsent:(BOOL)required;
3534
@end

iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSPrivacyConsentController.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ + (void)consentGranted:(BOOL)granted {
6565
[OneSignalUserDefaults.initStandard saveBoolForKey:GDPR_CONSENT_GRANTED withValue:granted];
6666
}
6767

68-
+ (BOOL)getPrivacyConsent {
69-
// The default is the inverse of privacy consent required
70-
BOOL defaultValue = ![OneSignalUserDefaults.initShared getSavedBoolForKey:OSUD_REQUIRES_USER_PRIVACY_CONSENT defaultValue:NO];
71-
return [OneSignalUserDefaults.initStandard getSavedBoolForKey:GDPR_CONSENT_GRANTED defaultValue:defaultValue];
72-
}
73-
7468
+ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName {
7569
if ([self requiresUserPrivacyConsent]) {
7670
if (methodName) {

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,6 @@ + (void)setConsentGiven:(BOOL)granted {
605605
_delayedInitParameters = nil;
606606
}
607607

608-
+ (BOOL)getPrivacyConsent {
609-
return [OSPrivacyConsentController getPrivacyConsent];
610-
}
611-
612608
+ (void)downloadIOSParamsWithAppId:(NSString *)appId {
613609
[OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"Downloading iOS parameters for this application"];
614610
_didCallDownloadParameters = true;

0 commit comments

Comments
 (0)