-
Notifications
You must be signed in to change notification settings - Fork 2
iOS GDPR Guide [ENG]
Interface for GDPR (EU General Data Protection Regulation) provided by AdNetwork SDK linked with Bidmad is provided.
As there are different interfaces depending on the Ad Network, Bidmad provide a total of two interfaces, so please use the interface that suits your network.
*Some networks do not provide the GDPR Interface, so please inquire before applying the GDPR.
Google sets up a user consent pop-up through the Funding Choices platform and exposes it to users through the UMP SDK.
Google GDPR Interface is a wrapper interface for UMP SDK provided by Google (Admob / Admanager).
If you applied Google GDPR through UMP SDK before Bidmad, you don't need to change to the interface provided by Bidmad.
After creating the user consent pop-up form in Funding Choices, follow the instructions below to request the user consent.
#import <BidmadSDK/BIDMADGDPRforGoogle.h>
...
@interface SampleViewController : UIViewController<..., BIDMADGDPRforGoogleProtocol>
BIDMADGDPRforGoogle *gdprUMP;
...
gdprUMP = [[BIDMADGDPRforGoogle alloc] initWith:self];
[gdprUMP setListener:self];
1. Request a consent popup to Google GDPR SDK.
2. Request to load the consent popup.
3. Check if GDPR consent is necessary and display the consent popup form to user.
4. Receive the results from consent popup form.
[gdprUMP requestConsentInfoUpdate];
// 1. a callback that you will be receiving after the consent request is done
-(void)onConsentInfoUpdateSuccess {
NSLog(@"onConsentInfoUpdateSuccess");
// 2. Check if the consent form is loadable
if([gdprUMP isConsentFormAvailable]) {
// 3. Load the consent form
[gdprUMP loadForm];
}
}
// 1. a callback that you will be receiving after the consent form is loaded
-(void)onConsentFormLoadSuccess{
NSLog(@"onConsentFormLoadSuccess");
// 2. Check if the GDPR Consent is necessary (required state)
if ([gdprUMP getConsentStatus] == BIDMAD_UMPConsentStatusRequired) {
// 3. Because consent is required, we need to show the consent form.
[gdprUMP showForm];
// Consent Request has not been made
} else if ([gdprUMP getConsentStatus] == BIDMAD_UMPConsentStatusUnknown) {
NSLog(@"ConsentStatusUnknown");
// Already received a consent status from user
} else if ([gdprUMP getConsentStatus] == BIDMAD_UMPConsentStatusObtained) {
NSLog(@"ConsentStatusObtained");
// GDPR consent is not necessary
} else if ([gdprUMP getConsentStatus] == BIDMAD_UMPConsentStatusNotRequired) {
NSLog(@"ConsentStatusNotRequired");
}
}
// A callback that sends a result after an interaction with the user. If formError is null, it means that you have successfully received either 'consent' or 'do not consent'.
-(void)onConsentFormDismissed: (NSError*)formError {
NSLog(@"onConsentFormDismissed error: %@ code: %li", formError.localizedDescription, (long)formError.code);
}
// Consent Popup Request Failure
-(void)onConsentInfoUpdateFailure: (NSError*)formError {
NSLog(@"onConsentInfoUpdateFailure error: %@ code: %li", formError.localizedDescription, (long)formError.code);
}
// Consent Popup Form Loading Failure
-(void)onConsentFormLoadFailure: (NSError*)formError {
NSLog(@"onConsentFormLoadFailure error: %@ code: %li", formError.localizedDescription, (long)formError.code);
}
- Once you are done with all the settings above, please request consent form Google GDPR
- And you will be seeing the following log on the Xcode console.
<UMP SDK> To enable debug mode for this device, set: UMPDebugSettings.testDeviceIdentifiers = @[ @"Test Device Unique ID" ];
- Insert the Test Device Unique ID to the following code and include the code in your initial settings explained above.
[gdprUMP setDebug:@"Test Device Unique ID" isTestEurope:YES];
This is an interface to the GDPR provided by other ad networks excluding Google (Admob / Admanager).
In other ad networks, the interface is configured to deliver the value of the user consent result (agree / disagree) to the SDK when requesting an advertisement.
The GDPR Interface provided by Bidmad delivers the result of user consent to each Ad Network's SDK.
If you want to use the GDPR Interface, develop a pop-up to obtain user consent and then call the GDPR Interface according to the pop-up result.
[BIDMADGDPR setUseArea:YES];
[BIDMADGDPR setGDPRSetting:YES];
GDPRConsentStatus gdprConsentStatus = [BIDMADGDPR getGDPRSetting];
GDPRConsentStatusYES = 1,
GDPRConsentStatusNO = 0,
GDPRConsentStatusUNKNOWN = -1,
GDPRConsentStatusUNUSE = -2