我正在尝试在我的应用中使用Google AdMob。但是,该应用在启动时不断崩溃。我相信我已经正确初始化了AdMob,因为我已将所需的GADApplicationIdentifier
键和值添加到了Info.plist
文件中,并且在GADMobileAds.sharedInstance().start(completionHandler: nil)
中也有AppDelegate.swift
。
这是我的错误日志:
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'
这是Swift 5和iOS 13的版本。
答案 0 :(得分:1)
答案 1 :(得分:0)
答案 2 :(得分:0)
我也遇到了这个错误,虽然将 GADIsAdManagerApp 设置为 true 确实可以解决这个问题,但 GoogleAdMobs 文档中没有任何内容说明要这样做。
我的问题是我没有输入我的付款详细信息并且我没有得到验证验证需要 24 小时,我只能使用 Firefox、Chrome 和 Safari 输入我的详细信息不想使用 AdMobs 网站.然而,一旦我等了一切,一切都会正常运行!