【问题标题】:Value of type 'Messaging' has no member 'shouldEstablishDirectChannel' after updating to Xcode 12更新到 Xcode 12 后,“Messaging”类型的值没有成员“shouldEstablishDirectChannel”
【发布时间】:2021-07-31 17:08:09
【问题描述】:

我在 Xcode 12 中得到类型为“消息”的值没有成员“shouldEstablishDirectChannel”错误,是否有人面临类似错误?

错误显示在:Messaging.messaging().shouldEstablishDirectChannel = true

【问题讨论】:

  • 是因为你更新到 XCode 12 还是因为你也做了pod update
  • 我已经升级了 Xcode 和 pod install

标签: swift ios14 xcode12


【解决方案1】:

您似乎也执行了pod update 或通过pod install 获得了最新的 pod 版本的 Firebase,但未指定版本。

看看Firebase Version 6.18.0 released on February 25, 2020是怎么说的:

已弃用通过 shouldEstablishDirectChannel 的 FCM 直接频道消息传递。相反,使用 APNs 进行下游消息传递。如果您想继续使用旧版 API,请将 content_available 密钥添加到您的有效负载中,但我们强烈推荐 HTTP v1 API,因为它提供了完整的 APN 支持。弃用的 API 将在 Firebase 7 中移除

此更改为 2020 年 2 月 18 日的 merged

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-01-05
    • 1970-01-01
    • 2019-08-14
    • 2019-07-25
    • 1970-01-01
    • 1970-01-01
    • 2017-01-21
    • 1970-01-01
    相关资源
    最近更新 更多