forPublisherIdentifiers: [“12345678”])
{(_ error: Error?) -> Void in
if let error = error {
// Consent info update failed.
print("Info Update Failed...")
} else {
// Consent info update succeeded. The shared PACConsentInformation
// instance has been updated.
}
}
PACConsentInformation.sharedInstance.debugGeography = PACDebugGeography.EEA;
if (PACConsentInformation.sharedInstance.isRequestLocationInEEAOrUnknown){
if(PACConsentInformation.sharedInstance.consentStatus == PACConsentStatus.unknown){
let urlToLoad = KeychainWrapper.standard.string(forKey: kPrivacyPolicyUrl)!
guard let privacyUrl = URL(string: urlToLoad),
let form = PACConsentForm(applicationPrivacyPolicyURL: privacyUrl) else {
print("incorrect privacy URL.")
return
}
form.shouldOfferPersonalizedAds = true
form.shouldOfferNonPersonalizedAds = true
form.shouldGroupAccessibilityChildren = true
//form.shouldOfferAdFree = false
//Load Form
form.load {(_ error: Error?) -> Void in
print("Load complete.")
if let error = error {
// Handle error.
print("Error loading form: \(error.localizedDescription)")
} else {
// Load successful.
form.present(from: self) { (error, userPrefersAdFree) in
if let error = error {
// Handle error.
} else if userPrefersAdFree {
// User prefers to use a paid version of the app.
} else {
// Check the user's consent choice.
let status =
PACConsentInformation.sharedInstance.consentStatus
print("Userconsent = \(status.rawValue)")
}
}
}
}
}
}
Also see attached screenshot of my App popup
I want to show first two options, (personalized ads and non personalized ads )to user how toachieve that, does anything wrong in code above?
Best,
Vivek
I am implementing EU Consent SDK for AD Mob, i am seeing pop up differently which is having only Agree button, not sure whats wrong, Here is my implementation Code:PACConsentInformation.sharedInstance.requestConsentInfoUpdate(
forPublisherIdentifiers: [“12345678”])
{(_ error: Error?) -> Void in
if let error = error {
// Consent info update failed.
print("Info Update Failed...")
} else {
// Consent info update succeeded. The shared PACConsentInformation
// instance has been updated.
// PACConsentInformation.sharedInstance.consentStatus = PACConsentStatus.unknown
}
}
//Debug only
//PACConsentInformation.sharedInstance.debugIdentifiers = ["05BB7349-74F8-4E83-BF71-E83245736C54"]
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/80e1f1e1-90c3-4662-9e1a-ed04398b7560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.