Hi,
I experiment for the first time SwifUI and UnityAds, and I have a problem. I’m sure I did something wrong, and I hope you will help me to understand and solve my issue.
My reward ad worked fine but after implementing AppTrackingTransparency, I face some error.
- When I launch the app, I prompt the authorization dialog → OK
- If I refuse the tracking, I can display my reward ad when I need to display it, I think that is okay too, if I well understand, the ad is display but there is no tracking.
- If I accept the tracking, I don’t have my reward ad display but I have the RGDP dialog, it seems to be ok but when I accept the cookie consent dialog, I expect my reward ad to display, but it doesn’t.
I have this error message :
E/UnityAds: +[USRVApiSdk WebViewExposed_logError:callback:] (line:63) :: Show invocation failed: Can’t show a new ad unit when privacy consent dialog is already open
If I close the app and relaunch it, I don’t have the authorization dialog as expected and everything works fine.
Thank you
I’m a little tired but I found a solution. But i’m not sure that’s a good solution.
I had these lines before UnityAds.show(…)
func showUnityAds(_ viewController: UIViewController, _ placementId: String) {
let gdprConsentMetaData = UADSMetaData()
gdprConsentMetaData.set("gdpr.consent", value: true)
gdprConsentMetaData.commit()
UnityAds.show(viewController, placementId: placementId, showDelegate: self)
}
I didn’t see the RGDP dialog, the reward ad show.
Is it the right way ?
Thx for your help
If you pass us gdprConsentMetaData then the Unity’s built-in solution dialog won’t show up. You can see more information here: GDPR compliance
It looks like your app is having trouble showing ads after the built-in dialog is shown, it would be great if you could contact us and provide a reproducible sample project and device logs.
Thank you @SamOYUnity3D , you understood my problem perfectly. And Yes I already read the page, that why I said that I’m not sure about this solution, because, in my opinion it’s not ^^
I will open a ticket about that.
1 Like