I've got an iOS project using Firebase, it's working fine. However, when I try to add AdMob, the app crashes when launching:
"'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initialized incorrectly. Google AdMob publishers should follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to include the AppMeasurement framework, set the -ObjC linker flag, and set GADApplicationIdentifier with a valid App ID. Google Ad Manager publishers should follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist'"
Just by adding pod 'Firebase/AdMob'
to the Podfile already produces this crash.
Then I added GADApplicationIdentifier
to the GoogleService-Info.plist
:
<key>GADApplicationIdentifier</key>
<string>APP_KEY</string>
Same thing, crash.
The app is linked to Firebase in the AdMob app site.
Anybody has any tips on this? Google's docs don't seem to be up to date, making a lot of confusion about AdMob implementation with/without Firebase.
Update the app's Info.plist - the file set in the INFOPLIST_FILE
Build Setting - not GoogleService-Info.plist
.