Closed francoisduchemin closed 8 months ago
I can confirm having the same experience in 5.1.1 test with, and without requestTrackingAuthorization: true,
For me too, Apple keeps rejecting my app because : "We're looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 16.6."
I dived into the code and noticed that line https://github.com/capacitor-community/admob/blob/master/ios/Plugin/Plugin.swift#L34 says "DEPRECATED: It's now ship with Admob UMP Consent"
@GiovanniBarile @francoisduchemin Does your rejected app show an AdMob UMP Consent dialog like the picture below? Or does it not show anything?
I am wondering if Apple accepts this dialog as an "App Tracking Transparency permission request"
I got it working. What seem to have changed in 5.1.1 is that you need to setup an IDFA Explainer message in Admob:
Goto https://apps.admob.com/v2/privacymessaging and create an IDFA explainer
When I turned this on the message appeared:
Also make sure this setting is enabled on the iOS device
We had testers who did not see the message because of this setting.
Hi there, thanks for your information, however, I haver set the message in Admob and still getting the same error. Did you got it working just after creating the message or maybe this need time to be processed?
@jportillo83 just after. I did not need to wait for things to be processed. I now have everything up and running in 5.1.1 except changing consent in iOS which is this bug report: https://github.com/capacitor-community/admob/issues/276
I understand. As you said, with version 5.0.0 is working but 5.1.0 and 5.1.1 are not working.
Do you know whether is it important this update or can I still go on with 5.0.0?
@jportillo83 For me everything works in 5.1.1. All the older versions had issues with consent management screens / popups.
@jportillo83 For me everything works in 5.1.1. All the older versions had issues with consent management screens / popups.
Just a last question. Do you need yo call the Admob.initialize function async? or need to use await before showing the first ad?
I call it like:
await AdMob.initialize({
testingDevices: environment.adMobTestDevices,
initializeForTesting: !environment.production,
requestTrackingAuthorization: true,
}).then(() => {
this.showFooterBanner();
});
Hi @basvdijk Does it work with test admob id? Because the app is not published yet the real id is not working.
@snr-lab Yes, I have it working in test mode and production
I've having the same issue, reverting to 5.0.0
fixes it for me as well. It did seem to work for a few of my apps but others only worked after reverting. I have tried setting the IDFA explainer on the AdMob website as well.
It works when I use the consent dialog mentioned in the docs, but I'd still rather just show the single "Allow" or "Ask App Not to Track" dialog without needing to trigger two dialogs.
const consentInfo = await AdMob.requestConsentInfo()
if (consentInfo.isConsentFormAvailable && consentInfo.status === AdmobConsentStatus.REQUIRED)
await AdMob.showConsentForm()
Hi, I have version 5.1.1 configured, I have defined in Google AdMob my GDPR messages and IDFA messages. I have also enabled in XCode the 'Background fetch', 'Remote notifications' and 'Background processing' capabilities.
Still, I am not getting the message in any of the XCode device simulators and I have been rejected the app stating:
Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 17.0.1.
I have also tried to apply version 5.0.0, with which in the XCode simulators the transparency message did appear, but when I sent the App for review it was rejected indicating the following:
Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 17.0.1.
My versions (ionic info) are as follows:
Ionic:
Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.4.2
@angular-devkit/build-angular : 16.2.4
@angular-devkit/schematics : 16.2.4
@angular/cli : 16.2.4
@ionic/angular-toolkit : 9.0.0
Capacitor:
Capacitor CLI : 5.4.1
@capacitor/android : not installed
@capacitor/core : 5.4.1
@capacitor/ios : 5.4.1
Utility:
cordova-res : 0.15.4
native-run : 1.7.3
System:
NodeJS : v20.8.0 (/usr/local/bin/node)
npm : 10.1.0
OS : macOS Monterey
Any ideas? I could provide XCode traces if that helps to see where the problem might be.
Many thanks in advance.
@juanqui66 Try to call the functions in following order (sequentially)
@juanqui66 same problem for me, i install this simple plugin for request tracking trasparency: https://github.com/mahnuh/capacitor-plugin-app-tracking-transparency and app store has accepted my submission
@juanqui66 Try to call the functions in following order (sequentially)
- AdMob.initialize
- AdMob.requestConsentInfo
- AdMob.showConsentForm (If consent form required )
- AdMob.showBanner
Great! With these steps I can now see it in all the XCode simulators and, I hope, that Apple will give me the go-ahead for the app. Thank you very much @snr-lab for the help and @PaoloDeLux for your comment, I'm sure it was also a good option.
@juanqui66 Try to call the functions in following order (sequentially)
- AdMob.initialize
- AdMob.requestConsentInfo
- AdMob.showConsentForm (If consent form required )
- AdMob.showBanner
These steps works for me too. Thank you very much @snr-lab
Thanks for issue. This seems to be an Apple issue, but we have added the following to the README so that we do not have to worry about the order of UMP implementation.
https://github.com/capacitor-community/admob/commit/21d0302426cafcc2464203cb9828dd31535bf2fb
Thanks for your valuable comments.
I updated readme example: https://github.com/capacitor-community/admob#initialize-admob
Please try by use v5.3.0
For me readme is a bit confusing. Because based on your comments I have understand showConsentForm launch the tracking transparency request if we have implemented in Admob IDF Explainer: https://support.google.com/admob/answer/10115027
Also in the documentation method says: request requestTrackingAuthorization (iOS >14). This is deprecated method. We recommend UMP Consent.
So based on Apple rejecting apps because tracking transparency request is required.
I would say that the initialize explanation on the README is deprecated because is using requestTrackingAuthorization And it should warns that for use the plugin in iOS it is required to implement the IDF Explainer.
Is this correct?
For some reason the IDFA explainer appeared after the IOS dialog for me. Obviously this should happen in the opposite order. The IDFA explainer first and then the IOS (allow/ask not to track) message.
Another question: How do I test this again? Because now even if I reinstall the app, neither dialog shows up anymore.
So anyone has an idea why the order is wrong? Here is my code:
private async trySetupAdBanner() {
let testingDevices: string[] = [];
let adId;
if (this.platform.is('android')) {
adId = '';
testingDevices = TESTING_DEVICES_ANDROID;
} else if (this.platform.is('ios')) {
adId = '';
testingDevices = TESTING_DEVICES_IOS;
} else {
console.error('Mobile but not android/ios ?')
return;
}
await AdMob.initialize({
initializeForTesting: true,
testingDevices, // Replace with your actual test device ID
});
const [trackingInfo, consentInfo] = await Promise.all([
AdMob.trackingAuthorizationStatus(),
AdMob.requestConsentInfo({
debugGeography: AdmobConsentDebugGeography.EEA,
testDeviceIdentifiers: Capacitor.getPlatform() === 'android' ? TESTING_DEVICES_ANDROID : TESTING_DEVICES_IOS,
}),
]);
if (trackingInfo.status === 'notDetermined') {
/**
* If you want to explain TrackingAuthorization before showing the iOS dialog,
* you can show the modal here.
* ex)
* const modal = await this.modalCtrl.create({
* component: RequestTrackingPage,
* });
* await modal.present();
* await modal.onDidDismiss(); // Wait for close modal
**/
await AdMob.requestTrackingAuthorization();
}
const authorizationStatus = await AdMob.trackingAuthorizationStatus();
if (
authorizationStatus.status === 'authorized' &&
consentInfo.isConsentFormAvailable &&
consentInfo.status === AdmobConsentStatus.REQUIRED
) {
await AdMob.showConsentForm();
}
...
Ok for testing multiple times, I am just using multiple emulators that I never used before, it's fine.
But why does the IOS-dialog show up before the explainer message?
Or is this not possible currently, to make it show up ahead automatically? And for sth to show up before it, I need to do what it says in the comment below maybe?
if (trackingInfo.status === 'notDetermined') {
/**
* If you want to explain TrackingAuthorization before showing the iOS dialog,
* you can show the modal here.
* ex)
* const modal = await this.modalCtrl.create({
* component: RequestTrackingPage,
* });
* await modal.present();
* await modal.onDidDismiss(); // Wait for close modal
**/
await AdMob.requestTrackingAuthorization();
}
If this is the case, then it would make sense to disable the IDFA explainer that shows up afterwards. How does one do that then?
I dived into the code and noticed that line https://github.com/capacitor-community/admob/blob/master/ios/Plugin/Plugin.swift#L34 says "DEPRECATED: It's now ship with Admob UMP Consent"
@GiovanniBarile @francoisduchemin Does your rejected app show an AdMob UMP Consent dialog like the picture below? Or does it not show anything?
I am wondering if Apple accepts this dialog as an "App Tracking Transparency permission request"
Yes I am wondering too. Maybe could you explain simply, how is this dialog and the ask to track dialog related? Isn't this dialog alone enough?
Hi, thanks for this plugin!
I updated the plugin to the latest version (5.1.1), submitted my app and got a rejection from Apple "Please explain where we can find the App Tracking Transparency permission request in your app".
After some testing, I noticed that the ATT message ("Allow [APP_NAME] to track your activity across other companies' apps and websites?" is indeed not displayed anymore with the version 5.1.1 of the plugin. Even with
requestTrackingAuthorization: true,
When I installed the version 5.0.0 it worked again correctly.