【问题标题】:Is there a bug with Firebase/ AdMob SDK? Xcode Main Thread Checker iOS 11Firebase/AdMob SDK 是否存在错误? Xcode 主线程检查器 iOS 11
【发布时间】:2017-10-06 00:46:55
【问题描述】:

我在 iOS 11 中不断收到这些警告。在装有 iOS 10 的设备上运行相同的应用程序不会产生任何这些警告。

Main Thread Checker: UI API called on a background thread: -[UIApplication keyWindow]
PID: 4945, TID: 148126, Thread name: (none), Queue name: com.google.admob.sdk-core-controller, QoS: 0

Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 4945, TID: 148126, Thread name: (none), Queue name: com.google.admob.sdk-core-controller, QoS: 0

Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 4945, TID: 148099, Thread name: (none), Queue name: com.google.fira.worker, QoS: 9


Main Thread Checker: UI API called on a background thread: -[UIApplication supportedInterfaceOrientationsForWindow:]
PID: 4945, TID: 148126, Thread name: (none), Queue name: com.google.admob.sdk-core-controller, QoS: 0

我有最新的豆荚:

pod 'Firebase/Core'
pod 'Firebase/AdMob'
pod 'Google/SignIn'

【问题讨论】:

  • 起来!你解决了吗?
  • 我更新到最新的 Firebase 版本,Google/SignIn pod 已经不存在了。现在是GoogleSignIn。现在没有警告...

标签: firebase admob ios10 ios11


【解决方案1】:

我在 iOS 11 上运行时遇到了同样的问题。所以这里有 2 个选项可以解决这个问题,供可能遇到此错误的人使用。

选项 1: 使用 CocoaPods 安装依赖项时,不要键入:

$pod install

你应该输入

pod install --repo-update

如果一切正常,pod 会将您的旧版 AdMob SDK 更新到最新版本。在这种情况下,您已准备就绪,无需尝试选项 2

选项 2: 如果您阅读了这部分内容,则意味着 Pod 没有成功更新您的 Admob。在这种情况下,您必须手动完成,这意味着(2 个步骤):

步骤 1) 在您的 podfile 中,您必须注释该行并在终端中重新运行 pod install

#pod 'Google-Mobile-Ads-SDK'

删除之前下载的 Admob 框架。

步骤 2) 直接下载新版 SDK 框架的副本,解压缩文件,然后将框架导入 Xcode 中的项目。 (查看图片以了解如何将框架添加到您的 Xcode 项目)

图片来源:Adding Frameworks to Your Xcode Project

【讨论】:

  • 您使用哪个 sdk 版本来解决这个问题?我在 7.0.0,这仍然显示
【解决方案2】:

只需使用最新的 pod。但应该使用这个命令:

% pod update

享受。这解决了我的问题。

【讨论】:

    猜你喜欢
    • 2018-03-03
    • 1970-01-01
    • 2017-12-10
    • 1970-01-01
    • 1970-01-01
    • 2011-04-02
    • 1970-01-01
    • 2014-05-23
    相关资源
    最近更新 更多