I have an Ionic 3 Project and its running normally on Ionic DevApp And Xcode. But When i added AdMob Plugin , its running normally Ionic DevApp but its not running on Xcode. I tried Simulator and Real Device but i have some mistake both of them.
There is my error codes;
Terminating app due to uncaught exception
'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
Have had this problem for two days now. The problem seems that the xcode project's plist file is not getting the admob settings right. So had to add them manually like this:
Open the your-app-name-Info.plist file under "ionic-project-root/platforms/ios/your-app-name/" and add these lines:
<key>GADIsAdManagerApp</key>
<true/>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXX~YYYYYYY</string>
Being ca-app-pub-XXXXXXX~YYYYYYY your ios app ID in admob. Now the error should go away.
There is a new procedure, you need to add GADIsAdManagerApp key for info.plist file with boolean YES value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With