GADInvalidInitializationException
Unity: All versions | Appodeal SDK: All versions
If the app crashes on startup, check the logs from your device. Connect a device with the app installed, open the iOS console, run the app and check logs. For more information about the console please visit Debugging with Xcode.
The following crash happens if AdMob APP ID
has not been specified in info.plist file, which is required for AdMob,A4G and Notsy networks.
Appodeal SDK contains these adapters by default.
The crash log example:
*** Terminating app due to uncaught exception 'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initialized without an application ID. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/AdMob-ios-update-plist to set GADApplicationIdentifier with a valid app ID. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist'
*** First throw call stack:
(
0 CoreFoundation 0x000000011576129b __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011bd5f735 objc_exception_throw + 48
2 CoreFoundation 0x0000000115760e09 -[NSException raise] + 9
3 unityiosbuild 0x000000010e74666b GADApplicationVerifyPublisherInitializedAnalyticsCorrectly + 414
4 unityiosbuild 0x000000010e6f77d6 GADEnvironmentIsSupported + 1020
5 libdispatch.dylib 0x000000011d33751d _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x000000011d338587 _dispatch_client_callout + 8
7 libdispatch.dylib 0x000000011d33ac60 _dispatch_queue_override_invoke + 840
8 libdispatch.dylib 0x000000011d3474af _dispatch_root_queue_drain + 355
9 libdispatch.dylib 0x000000011d347d19 _dispatch_worker_thread2 + 97
10 libsystem_pthread.dylib 0x000000011d72a6d5 _pthread_wqthread + 220
11 libsystem_pthread.dylib 0x000000011d72a57b start_wqthread + 15
)
Use Admob Adapter In Your App
If you are planning to use AdMob and A4G add AdMob App Id from the Unity Menu bar Appodeal → Appodeal Settings tool.
AdMob App ID
is the unique ID assigned to your app.
To find the AdMob App ID in your AdMob account, go to Apps → your application → app settings and copy the AdMob App ID.
For more information about AdMob sync check out our guide.
Remove Admob Adapter From Your App
If you are not planning to use AdMob and A4G networks, please remove them from the project using the Unity Menu bar Appodeal → Plugin Configuration or Appodeal → Manage Appodeal SDK.
You also need to remove Notsy adapter completing the steps below :
- UPM distribution
- Manual distribution
If you have removed the Admob and A4G adapters, don't forget to remove the BDMNotsyAdapter, following the path Assets/Appodeal/Editor/Dependencies/BidMachineDependencies.xml.
BDMNotsyAdapter also includes Google-Mobile-Ads-SDK inside, which requires Admob app ID entered in Appodeal Settings.
If you have removed the Admob and A4G adapters, don't forget to remove the BDMNotsyAdapter, following the path Assets/Appodeal/Editor/NetworkConfigs/BidMachineDependencies.xml.
BDMNotsyAdapter also includes Google-Mobile-Ads-SDK inside, which requires Admob app ID entered in Appodeal Settings.