iOS App not finding my GAdApplicationIdentifier in Info.plist

411 views
Skip to first unread message

Zach Tidwell

unread,
Dec 8, 2022, 2:28:15 PM12/8/22
to Google Mobile Ads SDK Developers

I'm attempting to use AdMob for the first time in a Swift project, and my project fails to run, throwing this exception, despite having an identifier from one of Google's test unit ids for Banner Ads from this tutorial (https://developers.google.com/admob/ios/test-ads). Here's the exception, *** Terminating app due to uncaught exception 'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initialized without an application ID. Google AdMob publishers, follow instructions at https://googlemobileadssdk.page.link/admob-ios-update-plist to set a valid application ID. Google Ad Manager publishers, follow instructions at https://googlemobileadssdk.page.link/ad-manager-ios-update-plist.'

terminating with uncaught exception of type NSException

(lldb) 


And here's the key/value from my Info.plist file:


GADApplicationIdentifier

ca-app-pub-3940256099942544/2934735716


Note: That was copied from the plist table in Xcode, and is of type String.


The only other thing I can think of is that I've missed something that's inaccessible in the Getting Started tutorials, as I'm completely-blind, and Google's general accessibility of their tools is lacking.


Can someone please assist me? 

Mobile Ads SDK Forum Advisor

unread,
Dec 9, 2022, 2:20:01 PM12/9/22
to zachtid...@gmail.com, google-adm...@googlegroups.com
Hi Zach,

Thank you for reaching out to us.

As per checking with the provided information on this thread, it appears that you're adding Ad unit ID instead of App ID to your GADApplicationIdentifier. For reference, ad unit IDs have a format that looks like ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx (note the slash), while the app ID uses a tilde (~) instead of a slash. For your case, kindly use our demo app ID ca-app-pub-3940256099942544~1458002511 instead.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


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