0

I am trying to set up Google AdMobs on a project that I have already set Firebase up in. I have been trying to follow the Update your info.plist section of the AdMob documentation here: https://developers.google.com/admob/ios/quick-start#swift

but I keep getting the "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." Error.

I am wondering if it is because my plist is named GoogleService-Info.plist rather than Info.plist (This is the name given by default when I first began using Firebase). If I try to rename the file to just Info.plist, the firestore part of my project breaks. Does AdMob require Info.plist to be named exactly that?

2 Answers2

0

I found that it does matter what plist I add Google AdMob to. XCode 13 got rid of the Info.plist but you can manually create an info.plist by following this guide: https://betterprogramming.pub/info-plist-is-missing-in-xcode-13-heres-how-to-get-it-back-1a7abf3e2514

Pasting to info.plist solved the issue for me.

0

I would recommend you to dig more about Info.plist. See this official docs and this medium blog.

First, Info.plist and GoogleService-Info.plist are used for different purposes. If you rename those files some of the service will break surely.

Second, Even if XCode 13, there is Info.plist(though you can't see in project navigator for fresh project). See this medium blog how to configure Info.plist for XCode 13

Dharman
  • 30,962
  • 25
  • 85
  • 135
ToooLazy
  • 71
  • 6