AdMob cannot load and show any ads when user denied tracking IDFA on ATT dialog

917 views
Skip to first unread message

Yutaka Omido

unread,
Dec 9, 2021, 9:03:58 PM12/9/21
to Google Mobile Ads SDK Developers
I am developing  a game with Unity, and I implemented a code to show AdMob.
However, when I test on real iOS device, if user denies tracking IDFA on ATT dialog, AdMob cannot load and show any ads.
If user accept tracking IDFA on ATT dialog, AdMob can load and show ads successfully.
I register my real iOS device as a test device, so ads are in test mode.

Here are my developing environments.
・Unity 2020.1.10f1
・AdMob Unity Package v6.1.2
・Test Device: iPhone XR (iOS 14.8)

I cannot detect what is the problem in my code, so please tell me some hints for solve this problem if you can.

Mobile Ads SDK Forum Advisor

unread,
Dec 10, 2021, 2:04:13 AM12/10/21
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yukata,

Thank you for reaching out to us.

For us to further investigate this, could you please provide the following details via Reply privately to author option or send it directly to mobileads...@gmail.com? Kindly inform us on this thread if you sent it directly to the email provided.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2Sdnx3:ref

Yutaka Omido

unread,
Dec 14, 2021, 5:12:50 AM12/14/21
to Google Mobile Ads SDK Developers
Thank you for your reply.

I sent email attaching reproducible project and my app/ad id.

Reproduce step is as follows.
1.  Download project zip from link above, and open it using Unity.
2.  In Unity, click File -> Build Settings.
3.  In Unity, click Build button.
4.  Open the .xcodeproj file which made by Unity using Xcode.
5.  Connect iPhone to PC and set as target device in Xcode. (My iPhone is registered as test device on AdMob web console, so it's better to register your iPhone as test device)
6.  In Xcode, build and run.
7.  ATT dialog will apper after app launched, then please deny tracing.
8.  Click banner toggle button, and banner ad never shows.
9.  Click interstitial show button, and interstitial ad never shows.
10. Click reward show button, and reward ad never shows.

And I realize a new behavior.
When I build with test ad id written in this document (https://developers.google.com/admob/unity/test-ads?hl=ja#ios), ad is successfully shown.
But using my id, ad never shown.

How can I solve this problem?

2021年12月10日金曜日 16:04:13 UTC+9 mobileadssdk:

Hi Yukata,

Thank you for reaching out to us.

For us to further investigate this, could you please provide the following details via Reply privately to author option or send it directly to mobileadstesting99@gmail.com? Kindly inform us on this thread if you sent it directly to the email provided.

Mobile Ads SDK Forum Advisor

unread,
Dec 15, 2021, 2:50:07 AM12/15/21
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

Thank you for providing additional information privately.

Upon checking, it seems that your implementation is correct as you also mentioned that using our test ads id shows you ads. This means that there might be an ad serving in your actual ads that are using. With that, we recommend reaching out to the Product Support Team as they are better equipped in checking if there's a problem in your ad unit id. We hope that you get a positive response from them the soonest time possible.

Yutaka Omido

unread,
Dec 15, 2021, 8:54:43 AM12/15/21
to Google Mobile Ads SDK Developers
Thank you for your advice.
I will ask same question to Product Support Team.

By the way, I have another problem that I want to ask some question.
I can explain the problem using project I sent yesterday.
Can I ask that in this thread or I have to create new thread?

My question detail is below.
-----
[summary] Audio cannot play after interstitial ad or reward ad played
[environment]

・Unity 2020.1.10f1
・AdMob Unity Package v6.1.2
・Test Device: iPhone XR (iOS 14.8)
[detail]
Using unity admob sdk, audio cannot play after interstitial ad or reward ad played.
I tried to restart BGM with Unity AudioSource Component, but audio never start.
When I start BGM after playing interstitial ad or reward ad, I got a log like this in Xcode console.

=== log start ===
2021-12-13 21:57:58.094198+0900 admob-sample[10880:1151670] [avas] AVAudioSession_iOS.mm:1206 Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.
=== log end ===

I realize that I can start audio if I call 'AudioSettings.Reset' method after playing ad,
but I have to call it every time user watches ad.
Why audio has gone and why I have to reset audio every time?
[reproduction step]
1.  Download project zip from link I sent yesterday, and open it using Unity.
2.  In Unity, click File -> Build Settings.
3.  In Unity, click Build button.
4.  Open the .xcodeproj file which made by Unity using Xcode.
5.  Connect iPhone to PC and set as target device in Xcode. (My iPhone is registered as test device on AdMob web console, so it's better to register your iPhone as test device)
6.  In Xcode, build and run.
7.  ATT dialog will apper after app launched, then please accept tracing.
8.  Click interstitial or reward show button, and interstitial ad shows.
9. After ad played, click audio start button, then audio never played.
10. Click audio reset button.
11. Click audio start button, audio can play at this time.
2021年12月15日水曜日 16:50:07 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Dec 16, 2021, 2:27:25 AM12/16/21
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

Thank you for your response.

With regard to the other concern of yours for audio, can you confirm if this is only happening on the actual device? Have you checked this in the simulator if this is reproducible on that? Also, is this only happening on the Test Device: iPhone XR (iOS 14.8)?  This will help us to determine this error.

Yutaka Omido

unread,
Dec 21, 2021, 9:40:07 AM12/21/21
to Google Mobile Ads SDK Developers
Hi, thank you for your reply.

I'm sorry I am late for response.
I answer your question below.

(1) With regard to the other concern of yours for audio, can you confirm if this is only happening on the actual device? Have you checked this in the simulator if this is reproducible on that?
I try to reproduce this audio problem in iOS simulator (iPhone11, iOS 14.5), but audio was not disappeared on simulator.
Also, when I run app on Unity Editor, audio was not disappeared.

(2) Also, is this only happening on the Test Device: iPhone XR (iOS 14.8)? 
I only have iPhone XR (iOS 14.8) and iPhone 6(iOS 12.5.5).
When I run my sample app on iPhone 6, audio was not disappeared after ad show.

Regards.
2021年12月16日木曜日 16:27:25 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Dec 22, 2021, 1:53:17 AM12/22/21
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

Thank you for your response.

Can you please provide us with a copy of the screen recording of your testing on what is happening to your project when you test it in iPhone XR? So that we can provide it also to the rest of the team for further investigation.

Yutaka Omido

unread,
Dec 24, 2021, 9:07:25 AM12/24/21
to Google Mobile Ads SDK Developers
Hi.

I sent a email attaching screen recording movie.
Email title is 'Game audio disappeared after AdMob ad show: see this movie'.
And I also attach a log file which log was shown in Xcode.

In the movie, I operate like below.
1. Tap ‘Audio Start’ button, and game audio successfully starts.
2. Tap ‘Interstitial Show’ button, and ad successfully show.
3. After ad end, audio completely disappeared from game.
4. Tap ‘Audio Start’ button again, but game audio never starts.
5. Tap ‘Audio Reset’ button and then tap ‘Audio Start’ button again, and game audio successfully starts.

Please check it with project source code I sent before.
I hope this will help your investigation.

Regards.

2021年12月22日水曜日 15:53:17 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Dec 27, 2021, 11:02:42 PM12/27/21
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

Thank you for providing the requested information.

In addition to what we already requested, can we also request for a copy of a Xcode project you built from the unity project you provided to us? This will help us to check the differences of building it in your end and in our end to trim down other necessary issues in building the project as we can't replicate it in our end at the moment. You can send it again via Reply privately to author option or send it directly to mobileads...@gmail.com. Kindly inform us on this thread if you sent it directly to the email provided.

Yutaka Omido

unread,
Dec 29, 2021, 9:23:51 AM12/29/21
to Google Mobile Ads SDK Developers
Hi.

I sent email attaching zipped Xcode project to address you provide.
Please check it out, and tell me what is the root issue of disappearing audio.

Regards.

2021年12月28日火曜日 13:02:42 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Jan 3, 2022, 3:15:30 AM1/3/22
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

Thank you for providing all requested information.

Upon further checking, I've seen a similar issue related to this that the rest of the team already handled. They also got an error of "AVAudioSession_iOS.mm:1149 Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session." which is similar to the error you've encountered. The team mentioned that video session activation can be controlled by publishers too. But in the SDK, they don't see any inappropriate active video session behavior. What they can recommend is when ads are playing, stop all background music. When ads finished/paused, resume background music. As this is the expected behavior now.

Yutaka Omido

unread,
Jan 11, 2022, 1:59:46 PM1/11/22
to Google Mobile Ads SDK Developers
Hi.

Thank you for your investigation and I'm sorry for my slow response.

> What they can recommend is when ads are playing, stop all background music. 
I understand.
But in my case, even though I stop all audio, AVAudioSession_iOS.mm:1149 error occurred.
I think something went wrong inside Unity AdMob SDK.
I'm now using AudioSettings.Reset method every time after ad closed for solve this .

By the way, I have another questions.
I write the question below, but if you want me to create new thread, please tell me so.

[Question 1]
Which version of AdMob SDK and Firebase SDK is compatible in Unity?
When I introduce both SDK into project and build iOS app, "GoogleAppMeasurement" conflicted.
Do you have any documents about version compatibility of AdMob SDK and Firebase SDK?
And, when I face the conflict of dependency of "GoogleAppMeasurement", is there a correct workload for solve the problem?

[Question 2]
In this thread, I asked a question about "AdMob cannot load and show any ads when user denied tracking IDFA on ATT dialog" at first.
And you advised me to contact Product Support Team.
So, I created a thread on Community like below.
But nobody respond for the thread even through I created thread on Decembar 16th.
I mistook where to write a question?

Regards.

2022年1月3日月曜日 17:15:30 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Jan 12, 2022, 3:25:28 AM1/12/22
to yutaka...@gmail.com, google-adm...@googlegroups.com
Hi Yutaka,

Thank you for getting back to us. I've shared your feedback to the rest of the team. I'll get back to you the soonest I hear back from them.

On the other hand, we usually asked our publishers to run the pod install --repo-update on their project app if they encounter any conflict issue. Since your project is build in Unity, then we would recommend you to export it to xCode project first before running the command mentioned above.

As per Product Support Team, I'm afraid that we don't have any control or visibility on that forum. I hope you get a response from them soon.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Sdnx3:ref

Yutaka Omido

unread,
Jan 12, 2022, 8:34:42 AM1/12/22
to Google Mobile Ads SDK Developers
Hi.

Thank you for your reply.

> I've shared your feedback to the rest of the team. I'll get back to you the soonest I hear back from them.
I understand.
I hope you solve this problem.

> we usually asked our publishers to run the pod install --repo-update on their project app if they encounter any conflict issue. 
I understand.
Thank you for your advice.

> As per Product Support Team, I'm afraid that we don't have any control or visibility on that forum.
Okey, I will wait for response.


I have another question (I'm sorry I have many question for SDK...).
When users deny tracking on ATT dialog, Should I use the code like below?

=== code start ===
AdRequest request = new AdRequest.Builder()
        .AddExtra("npa", "1") // Is this line necessary when users deny tracking on ATT dialog?
        .Build();

=== code end ===

I found this code in the document below.

Regards.
2022年1月12日水曜日 17:25:28 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Jan 12, 2022, 10:21:13 AM1/12/22
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

Thank you for your response.

With regard to your question, yes, you should use the code like the one you provided when the user denied the consent. Since the default behavior of the Google Mobile Ads SDK is to serve personalized ads.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Sdnx3:ref

Yutaka Omido

unread,
Jan 12, 2022, 12:17:58 PM1/12/22
to Google Mobile Ads SDK Developers
Hi.

Thank you for your reply.

I understand.
I think the fact that we should use the code like the one I provided when the user denied the consent should be written in the page below.
Then developers like me can save time and it's easier to understand.

Ideally, I think it is better if you write an article about how to handle iOS 14 with AdMob for developers using the Unity SDK.
Please consider it!

Regards.

2022年1月13日木曜日 0:21:13 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Jan 12, 2022, 9:09:07 PM1/12/22
to yutaka...@gmail.com, google-adm...@googlegroups.com
Hi Yutaka,

Thank you for getting back to us.

With regard to your concern, the snippet code that you provided is just a consideration, and not a requirement. As per the use case when your users denied the ATT dialog, the SDK should automatically served non-personalized ads.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Sdnx3:ref

Yutaka Omido

unread,
Jan 13, 2022, 4:00:36 AM1/13/22
to Google Mobile Ads SDK Developers
Hi.

Thank you for your response.

Now, I have another question.

I built my Unity app for both iOS/Android and tested it in actual devices.
Devices using for test registered as test device on Web Console.
Ad unit id passed to create ad request is real one, not test ad unit id.
So, I expect to show test ads on both of them.
But in Android, Ads did not show and OnAdFailedToLoad callback received error message "No ad config.".
Could you tell me how to solve this problem?

Regards.
2022年1月13日木曜日 11:09:07 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Jan 13, 2022, 7:35:20 AM1/13/22
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

With regard to your concern for No ad config, we usually mentioned to the user to check the common reason for ads not showing. In addition to that, we recommend using the troubleshooter for ads that don't show.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Sdnx3:ref

Yutaka Omido

unread,
Jan 13, 2022, 9:04:27 AM1/13/22
to Google Mobile Ads SDK Developers
Hi.

Thank you for your advice.
I read pages you provide, and I realized that my app was previously published to Google Play and now delete from there because of Google Play Policy error.
I think that I have to clear this Google Play Policy error to show ad.
Does Google Play Policy error affect to not only production ad but also the test ad using test device, right?

Regards.

2022年1月13日木曜日 21:35:20 UTC+9 mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Jan 13, 2022, 10:30:41 AM1/13/22
to yutaka...@gmail.com, google-adm...@googlegroups.com

Hi Yutaka,

I would suggest fixing any policy error with your account if any, to ensure that ads will show. Once fixed, kindly check again if you're now able to get ads on it. If still not, kindly provide us the affected ad unit id you mentioned that are not showing ads as well as your app id via Reply privately to author option or send it directly to mobileads...@gmail.com. Kindly inform us on this thread if you sent it directly to the email provided.

Also, you mentioned that the test ad unit id is not working, can you confirm if this is only specific to your application? Were you able to show ads using our Sample App Android? If yes, then the policy error that you've encountered might be the reason for it.

Yutaka Omido

unread,
Jan 14, 2022, 1:08:56 PM1/14/22
to Google Mobile Ads SDK Developers
Hi.

Thank you for your replying.

> I would suggest fixing any policy error with your account if any, to ensure that ads will show. 
Okey, I will fix policy error and see whether ad can load or not.


I want to ask another question about UnityAds mediation.
I set up AdMob and UnityAds for UnityAds mediation and import UnityAds Unity Adapter v3.0.0 to my project.
Then, while I can successfully build and run the game on android, it was failed on iOS.
When I build for iOS, creating Xcode project (build on Unity) was successfully finished.
But build on Xcode was failed with error logs below.
On android, I confirmed it is successfully load both AdMob ad and UnityAds using Mediation Test Suite.

Additionally, I introduced Firebase Analytics and Crashlytics for my project.
(I don't know whether it affects the error or not...)

I could not understand what is happening, so please give me some advice to solve this problem.
Does this error cause because of Unity package version mismatch?

Here are my developing environments.
・Unity 2020.1.10f1
・AdMob Unity Package v6.1.2
・UnityAds Unity Adapter v3.0.0
・Mediation Test Suite Unity Package latest
・Firebase Analytics v8.7.0
・Firebase Crashlytics v8.7.0
・Test Device: iPhone XR (iOS 14.8)

===== error log from here =====
Undefined symbols for architecture arm64:
  "_kGADAdSizeLeaderboard", referenced from:
      _supportedAdSizeFromRequestedSize in UnityAdapter(GADMAdapterUnityUtils.o)
  "_GADClosestValidSizeForAdSizes", referenced from:
      _supportedAdSizeFromRequestedSize in UnityAdapter(GADMAdapterUnityUtils.o)
  "_IsGADAdSizeValid", referenced from:
      -[GADMediationAdapterUnity loadBannerForAdConfiguration:completionHandler:] in UnityAdapter(GADMediationAdapterUnity.o)
      -[GADMAdapterUnity getBannerWithSize:] in UnityAdapter(GADMAdapterUnity.o)
  "_OBJC_CLASS_$_GADExtras", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSMediationHelper.o)
  "_OBJC_CLASS_$_GADMediationServerConfiguration", referenced from:
      __OBJC_$_CATEGORY_GADMediationServerConfiguration_$_Settings in UnityAdapter(GADMediationConfigurationSettings.o)
  "_kGADAdSizeBanner", referenced from:
      -[GMTSBannerAdLoader initWithAdUnitId:rootViewController:] in GoogleMobileAdsMediationTestSuite(GMTSBannerAdLoader.o)
      _supportedAdSizeFromRequestedSize in UnityAdapter(GADMAdapterUnityUtils.o)
  "_OBJC_CLASS_$_GADAdReward", referenced from:
      objc-class-ref in UnityAdapter(GADMUnityRewardedMediationAdapterProxy.o)
  "_OBJC_CLASS_$_GADAdLoader", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSNativeAdLoader.o)
  "_kGADSimulatorID", referenced from:
      _GMTSMediationRequest in GoogleMobileAdsMediationTestSuite(GMTSMediationHelper.o)
  "_NSValueFromGADAdSize", referenced from:
      _supportedAdSizeFromRequestedSize in UnityAdapter(GADMAdapterUnityUtils.o)
  "_OBJC_CLASS_$_GADMediationAdConfiguration", referenced from:
      __OBJC_$_CATEGORY_GADMediationAdConfiguration_$_Settings in UnityAdapter(GADMediationConfigurationSettings.o)
  "_OBJC_CLASS_$_GADRewardedAd", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSAdSourceCollectionViewController.o)
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSRewardedAdLoader.o)
     (maybe you meant: _OBJC_CLASS_$_GADRewardedAdBridgeV8, _OBJC_CLASS_$_GADRewardedAdBridge )
  "_OBJC_CLASS_$_GAMRequest", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSProductTheme.o)
  "_GADGoogleAdNetworkClassName", referenced from:
      -[GMTSYieldGroupConfig initWithYieldGroupId:initConfigs:] in GoogleMobileAdsMediationTestSuite(GMTSYieldGroupConfig.o)
  "_OBJC_CLASS_$_GADMobileAds", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSAdNetworkConfig.o)
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSMediationHelper.o)
     (maybe you meant: _OBJC_CLASS_$_GADMobileAdsBridge)
  "_kGADAdLoaderAdTypeNative", referenced from:
      -[GMTSNativeAdLoader initWithAdUnitId:rootViewController:] in GoogleMobileAdsMediationTestSuite(GMTSNativeAdLoader.o)
  "_NSStringFromGADAdSize", referenced from:
      +[NSError(Unity) unsupportedBannerGADAdSize:] in UnityAdapter(NSErrorUnity.o)
  "_OBJC_CLASS_$_GAMBannerView", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSProductTheme.o)
  "_OBJC_CLASS_$_GADNativeAd", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSAdSourceCollectionViewController.o)
  "_OBJC_CLASS_$_GADBannerView", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSAdSourceCollectionViewController.o)
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSProductTheme.o)
  "_OBJC_CLASS_$_GADInterstitialAd", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSAdSourceCollectionViewController.o)
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSInterstitialAdLoader.o)
     (maybe you meant: _OBJC_CLASS_$_GADInterstitialAdBridgeV8)
  "_OBJC_CLASS_$_GADRequest", referenced from:
      objc-class-ref in GoogleMobileAdsMediationTestSuite(GMTSProductTheme.o)
     (maybe you meant: _OBJC_CLASS_$_GADRequestBridge)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
===== error log end =====

Regards.


2022年1月14日金曜日 0:30:41 UTC+9 mobileadssdk:

Yutaka Omido

unread,
Jan 15, 2022, 1:42:17 AM1/15/22
to Google Mobile Ads SDK Developers
Hi.

I tried to solve "Undefined symbols for architecture arm64" UnityAds mediation error,
and now I could solve it by checking checkbox in Assets > External Dependency Manager > iOS Resolver > Settings > Link Frameworks staticaly.

Then, I came to be able to build and run the game.
But on iOS, when I call MediationTestSuite.Show method,  mediation test suite window was blacked out like a image I attach to this message.
On Android, it was successfully shown with no black out.
Do you know why it is blacked out only on iOS?

Regards.

IMG_8239.PNG

2022年1月15日土曜日 3:08:56 UTC+9 Yutaka Omido:

Mobile Ads SDK Forum Advisor

unread,
Jan 17, 2022, 1:02:58 AM1/17/22
to yutaka...@gmail.com, google-adm...@googlegroups.com
Hi Yutaka,

Thank you for updating us and I'm glad that you were able to solved the initial issue reported.

With regard to iOS mediation test suite, could you kindly export the said project to XCode project first, run the app from their, then let me know how it goes?

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Sdnx3:ref
Reply all
Reply to author
Forward
0 new messages