Crash when using Facebook Ads SDK via AdMob mediation after SDK updates

132 views
Skip to first unread message

K Shota

unread,
May 27, 2025, 8:04:17 PMMay 27
to Google Mobile Ads SDK Developers
Hi AdMob Team,

We are currently integrating Facebook Ads via AdMob mediation in our iOS application. After updating to the latest SDK versions, we encountered a crash when attempting to load banner ads.

Crash Context:

  • Timing: When loading banner ads

  • Google Mobile Ads SDK: v12.1.0

  • Facebook Audience Network / Mediation Adapter: v6.17.1

This crash did not occur with the following versions:

  • Google Mobile Ads SDK: v11

  • Facebook Audience Network: v6.15.2


Findings and Hypothesis:

Through our investigation, we suspect the crash is caused by the following:

  • The mediation adapter is calling FBAdView.loadAd(), which is deprecated.

  • Internally, this method attempts to access AppDelegate.window.

  • Our app supports multi-window architecture and does not define a window property in AppDelegate.

  • As a result, a runtime crash occurs due to an unrecognized selector.

We confirmed that adding the window property to AppDelegate prevents the crash, but this contradicts our architectural design and is not a viable long-term solution.


Questions for Meta:

  1. In this context, should we be using loadAd(withBidPayload:) instead of the deprecated loadAd()?

  2. Is this a known issue, and is there a planned fix or recommended workaround?

We would greatly appreciate your guidance or an official recommendation to help us ensure a stable and future-proof integration.

Thank you for your support.

Best regards,

K Shota

Mobile Ads SDK Forum Advisor

unread,
May 28, 2025, 2:35:27 AMMay 28
to kin...@quadsystem.co.jp, google-adm...@googlegroups.com

Hi Shota,

Thank you for contacting the Mobile Ads SDK Support team.

It is always recommended to use the latest versions of the SDK. As of today, the latest version of the Google Mobile Ads iOS is 12.5.0.

Thanks for the thorough explanation. Could you please confirm if you've been able to reproduce this behavior within our iOS Sample application after adding the relevant code? If so, please share the following details to help us investigate further and provide a solution:

  • app ID and ad unit ID
  • Crash stack traces or logs
  • Screen recording of the issue
  • Steps to reproduce the issue in Google sample project
  • If no, please share your sample project where the issue is reproducible

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb. Kindly follow using the steps below:

1. Navigate to https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=500Ht00001qYNQWIA4&entry.80707362=00308673

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-05-28 06:34:32Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qYNQW:ref" (ADR-00308673)



K Shota

unread,
May 28, 2025, 4:12:18 AMMay 28
to Google Mobile Ads SDK Developers

Dear Team,

Thank you for your response.

As you suggested, we have confirmed that the issue still persists with the latest Google Mobile Ads SDK v12.5.0.

However, to prevent this crash from affecting end users, we have disabled Meta Audience Network within AdMob mediation in our production environment. As such, the crash does not currently occur for users, though the underlying issue remains.

Reproducibility
The issue appears to occur when FBAdView.loadAd() is called under certain conditions, leading to a crash.

This method internally attempts to access AppDelegate.window. However, our app is designed to support multi-window environments and does not define a window property in the AppDelegate, which we believe causes the unrecognized selector crash.

This behavior can be reproduced when Meta Audience Network is enabled in AdMob mediation, though our current environment has it disabled. We are currently reviewing whether this issue can be reproduced within Google’s iOS sample project by integrating similar code.

We will share the following materials in a follow-up message as soon as we finish preparing them:

  • A sample project if applicable

Thank you again for your support.

Best regards,

K Shota


2025年5月28日水曜日 15:35:27 UTC+9 Mobile Ads SDK Forum Advisor:

K Shota

unread,
Jun 6, 2025, 2:01:52 AMJun 6
to Google Mobile Ads SDK Developers

Dear Team,

Hello again,
We have prepared a sample project that reproduces the issue, and have submitted it using the upload form you provided.

In this sample, you can observe the crash that occurs when calling FBAdView.loadAd(), which internally attempts to access AppDelegate.window.

We appreciate your time and look forward to your analysis.

Best regards,

K Shota
2025年5月28日水曜日 17:12:18 UTC+9 K Shota:

Mobile Ads SDK Forum Advisor

unread,
Jun 6, 2025, 8:21:23 AMJun 6
to kin...@quadsystem.co.jp, google-adm...@googlegroups.com

Hi Shota,

Please note that we have not received any files. Would you kindly reshare through the link below?

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=500Ht00001qYNQWIA4&entry.80707362=00308673

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-06 12:20:16Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qYNQW:ref" (ADR-00308673)



K Shota

unread,
Jun 6, 2025, 9:36:58 PMJun 6
to Google Mobile Ads SDK Developers

Dear Team,

Thank you for your message.
As requested, we have re-uploaded the sample file using the link you provided.

Please let us know once it's received. We appreciate your continued support.

Best regards,

K Shota
2025年6月6日金曜日 21:21:23 UTC+9 Mobile Ads SDK Forum Advisor:

Mobile Ads SDK Forum Advisor

unread,
Jun 9, 2025, 2:08:43 AMJun 9
to kin...@quadsystem.co.jp, google-adm...@googlegroups.com

Hi Shota,

Thank you for providing the requested information.

Please note that the 'loadAd()' is deprecated. This method will be removed in future version. Testing of the provided sample project using 'loadAdWithBidPayload' has confirmed the successful loading of Ads.

It is requested that you utilize 'adView.loadAd(withBidPayload: "PLACEMENTID")' in place of 'adView.loadAd()'.

Kindly report the outcomes subsequent to implementing these modifications.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-09 06:07:36Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qYNQW:ref" (ADR-00308673)



K Shota

unread,
Jun 9, 2025, 3:01:38 AMJun 9
to Google Mobile Ads SDK Developers

Dear Team,

Thank you for your continued support.

We understand that loadAd() is deprecated and scheduled to be removed in a future release.
However, the current Meta Audience Network iOS mediation adapter (version 6.17.1.0) still uses loadAd() internally, which is the root cause of the crash we are experiencing.

Our app is built to support multi-window environments and does not define a window property on the AppDelegate. As a result, when the adapter internally calls loadAd(), it triggers a crash due to an unrecognized selector when trying to access AppDelegate.window.

While using loadAd(withBidPayload:) directly in the app works correctly, this crash cannot be avoided when using AdMob mediation, since the adapter enforces the use of the deprecated loadAd() method internally.

Therefore, we strongly request that the mediation adapter itself be updated to stop using the deprecated loadAd() method and instead use loadAd(withBidPayload:).

We would greatly appreciate your consideration of this change.

Best regards,

K Shota
2025年6月9日月曜日 15:08:43 UTC+9 Mobile Ads SDK Forum Advisor:

Mobile Ads SDK Forum Advisor

unread,
Jun 9, 2025, 9:50:54 AMJun 9
to kin...@quadsystem.co.jp, google-adm...@googlegroups.com

Hi,

The loadAd method still works for single-window apps without causing a crash. However, the SDK cannot determine in advance whether your app uses multiple windows or a single window.

But Yes, that’s a good suggestion to remove this method permanently if it’s deprecated. 

For your use case, please use adView.loadAd. If you encounter any further issues related to the Mobile Ads SDK, feel free to reach out to us again.

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-09 13:49:40Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qYNQW:ref" (ADR-00308673)



Reply all
Reply to author
Forward
0 new messages