问题
https://ratson.github.io/cordova-plugin-admob-free
running results in exception:
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'
I set the 'GADApplicationIdentifier' value in the *.plist file but still get the same error. What it can be?
回答1:
I had the same issue and resolved it by adding GADIsAdManagerApp key with a boolean value YES to my app's Info.plist.
As you can see in the sdk documents,
This step is required as of Google Mobile Ads SDK version 7.42.0. Failure to add add this Info.plist entry results in a crash with the message: "The Google Mobile Ads SDK was initialized incorrectly."
来源:https://stackoverflow.com/questions/55781439/cordova-admob-free-in-ios-exception-when-app-running