Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
nan-li committed Feb 12, 2025
commit e16d2ba3803df7b35bf505bf73ba003e087abf1d
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ THE SOFTWARE.
@interface OSPrivacyConsentController : NSObject
+ (BOOL)requiresUserPrivacyConsent;
+ (void)consentGranted:(BOOL)granted;
+ (BOOL)getPrivacyConsent;
+ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName;
+ (void)setRequiresPrivacyConsent:(BOOL)required;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ + (void)consentGranted:(BOOL)granted {
[OneSignalUserDefaults.initStandard saveBoolForKey:GDPR_CONSENT_GRANTED withValue:granted];
}

+ (BOOL)getPrivacyConsent {
// The default is the inverse of privacy consent required
BOOL defaultValue = ![OneSignalUserDefaults.initShared getSavedBoolForKey:OSUD_REQUIRES_USER_PRIVACY_CONSENT defaultValue:NO];
return [OneSignalUserDefaults.initStandard getSavedBoolForKey:GDPR_CONSENT_GRANTED defaultValue:defaultValue];
}

+ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName {
if ([self requiresUserPrivacyConsent]) {
if (methodName) {
Expand Down
4 changes: 0 additions & 4 deletions iOS_SDK/OneSignalSDK/Source/OneSignal.m
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,6 @@ + (void)setConsentGiven:(BOOL)granted {
_delayedInitParameters = nil;
}

+ (BOOL)getPrivacyConsent {
return [OSPrivacyConsentController getPrivacyConsent];
}

+ (void)downloadIOSParamsWithAppId:(NSString *)appId {
[OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"Downloading iOS parameters for this application"];
_didCallDownloadParameters = true;
Expand Down