更新到 Xcode 11 Swift 5.1 后出现 Google AdMob 错误
Posted
技术标签:
【中文标题】更新到 Xcode 11 Swift 5.1 后出现 Google AdMob 错误【英文标题】:Google AdMob error after update to Xcode 11 Swift 5.1 【发布时间】:2020-02-10 06:13:54 【问题描述】:自从我更新到 Xcode 11 后,我的应用中的插页式广告将不再加载。 (在此之前一切正常。该应用甚至已在 App Store 上发布。我们现在正在创建该应用的更新版本)
我通过 Cocoapods 安装了 Google AdMobs SDK 并将其更新到最新版本。仍然没有成功。 (我按照谷歌教程的所有步骤,如何实现插页式广告) 这些是我从控制台收到的错误消息:
2019-10-10 21:42:35.543249+0100 BuszZer[76592:876619] <Google> To get test ads on this device, set: request.testDevices = @[ kGADSimulatorID ];
2019-10-10 21:42:35.599222+0100 BuszZer[76592:876796] [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-10 21:42:35.599426+0100 BuszZer[76592:876796] [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-10 21:42:35.599610+0100 BuszZer[76592:876787] [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-10 21:42:35.600170+0100 BuszZer[76592:876787] [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-10 21:42:35.600215+0100 BuszZer[76592:876796] [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-10 21:42:35.601185+0100 BuszZer[76592:876787] [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-10 21:42:35.601435+0100 BuszZer[76592:876796] [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-10 21:42:35.608414+0100 BuszZer[76592:876619] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000360a1a0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2019-10-10 21:42:35.610662+0100 BuszZer[76592:876789] - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-9056820091768756~5451481231
2019-10-10 21:42:35.611337+0100 BuszZer[76592:876789] - <Google>[I-ACS023007] Analytics v.60102000 started
2019-10-10 21:42:35.611517+0100 BuszZer[76592:876789] - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see https://help.apple.com/xcode/mac/8.0/#/dev3ec8a1cb4)
有没有人有类似的问题或经历并知道如何解决?任何帮助表示赞赏。 非常感谢!
【问题讨论】:
我的 AdMob 横幅测试广告在 XCode 11.1 的调试控制台中出现这些错误。测试广告正在模拟器和设备中加载。 【参考方案1】:尝试在终端中运行此命令:
xcrun simctl spawn booted log config \
--mode "level:off" \
--subsystem com.apple.CoreTelephony
【讨论】:
解释一下这个命令的作用以及它如何帮助解决这个问题会很有帮助。以上是关于更新到 Xcode 11 Swift 5.1 后出现 Google AdMob 错误的主要内容,如果未能解决你的问题,请参考以下文章
如何解决问题 UIPickerView 致命错误:索引超出范围 [IOS Swift 5.1 Xcode 11.2]
swift 5.1 Xcode iOS中的firebase服务类
为啥我在 swift 上的视图是这样的 我更新了它,现在我可以向下滑动并能够返回到最后一页 XCODE 11
安装 Xcode10.2.1 但仍然收到错误“使用 Swift 5.0.1 编译的模块无法由 Swift 5.1 编译器导入”
Alamofire 库 request.swift 文件中发生错误 - 更新到 xcode 8.1 后“任务使用不明确”