Reputation: 441
I'm trying to use Google AdMob in my app. However, the app keeps crashing on launch. I believe I've initialized AdMob properly, since I added the required GADApplicationIdentifier
key and value to my Info.plist
file, and I also have GADMobileAds.sharedInstance().start(completionHandler: nil)
in AppDelegate.swift
.
Here is my error log:
2019-10-02 00:23:18.731486-0400 App Name[15066:162231] [Crashlytics] Version 3.14.0 (144)
2019-10-02 00:23:18.741556-0400 App Name[15066:162311] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.742118-0400 App Name[15066:162335] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.743045-0400 App Name[15066:162335] [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.746628-0400 App Name[15066:162311] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.746676-0400 App Name[15066:162336] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.747969-0400 App Name[15066:162311] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.748361-0400 App Name[15066:162337] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2019-10-02 00:23:18.787064-0400 App Name[15066:162231] *** 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'
This is with Swift 5 and iOS 13.
Upvotes: 2
Views: 7346
Reputation: 53
I had this error also, while setting GADIsAdManagerApp as true does fix it there is nothing on GoogleAdMobs docs that says to do this.
My problem was that I had not put in my payment details and I had not been verified the verification took 24 hours and I was only able to input my details by using Firefox, Chrome and Safari did not want to work with AdMobs website. However once I had waited everything was working as it should've!
Upvotes: 1
Reputation: 610
Search for Info.plist on your project and add parameter named GADIsAdManagerApp it should be Boolean and set it to YES.
then run and you will see the success. Info.plist should be like that:
Upvotes: 1
Reputation: 2176
Add GADIsAdManagerApp
with positive value to your Info.plist file like this:
This fixed crash for me.
Upvotes: 18