As a publisher, you are expected to manage the CCPA consent for your users as necessary. You are responsible for presenting the consent solicitation/dialog to the users and capture and save their opt-out preference. Per IAB standards you are also expected to save the user's preference, in a standard format published by iAB CCPA Storage Format, in "shared" storage for the App on user's mobile device from where our SDK will access it.
You may use the following convenience methods our SDK provides to set and access the shared storage compliant with IAB standards:
As a first step, do not forget to import HyBid
into your class.
import HyBid
#import <HyBid/HyBid.h>
Setting the consent
To set the U.S. Privacy String use setIABUSPrivacyString
method, e.g.
HyBidUserDataManager.sharedInstance().setIABUSPrivacyString("<US_PRIVACY_STRING>")
[[HyBidUserDataManager sharedInstance] setIABUSPrivacyString:@"<US_PRIVACY_STRING>"];
Getting the consent
To read the stored value, use getIABUSPrivacyString
method, e.g.
let storedUSPrivacyString = HyBidUserDataManager.sharedInstance().getIABUSPrivacyString()
NSString *storedUSPrivacyString = [[HyBidUserDataManager sharedInstance] getIABUSPrivacyString];
Alternatively you can use the following method to get a boolean value specifying if the user has opted out of data collection:
HyBidUserDataManager.sharedInstance().isCCPAOptOut()
[[HyBidUserDataManager sharedInstance] isCCPAOptOut];
Clearing consent value
To remove the stored value, use removeIABUSPrivacyString
method, e.g.
HyBidUserDataManager.sharedInstance().removeIABUSPrivacyString()
[[HyBidUserDataManager sharedInstance] removeIABUSPrivacyString];