【问题标题】:Firebase ambiguous reference "FIRMessagingAPNSTokenType... is ambiguous"Firebase 模棱两可的参考“FIRMessagingAPNSTokenType ... 模棱两可”
【发布时间】:2018-05-29 14:05:31
【问题描述】:

在升级 Firebase Pods 后,项目有不明确的参考问题,有什么建议吗?

当我使用版本为 4.10.0 的 Pod 时,它可以完美运行,但如果我使用最新版本 (5.0.0),我会收到错误。

我的播客文件:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'AppName' do
    pod 'OpenSSL-Universal'
    pod 'Firebase/Core', '4.10.0'
    pod 'Firebase/Messaging', '4.10.0'
    pod 'GoogleToolboxForMac/Logger'
    pod 'AppCenter'
end

target 'AppName DEV' do
    pod 'OpenSSL-Universal'
    pod 'Firebase/Core', '4.10.0'
    pod 'Firebase/Messaging', '4.10.0'
    pod 'GoogleToolboxForMac/Logger'
    pod 'AppCenter'
end`

谢谢,前进!!

【问题讨论】:

  • 您能否将您的完整错误发布为文本而不是图像?不幸的是,我把放大镜忘在火车上了,所以我现在无法阅读。

标签: ios objective-c firebase firebase-cloud-messaging


【解决方案1】:

如果您在 2 个不同的框架中拥有相同的类,通常会发生这种情况。能不能同时引用4和5?

尝试注释掉“BRy-Autenticador DEV”部分并仅构建“BRy-Autenticador”目标。

运行“pod install”后检查您的 Podfile.lock。它应该只包含一个版本的 Firebase 框架。

【讨论】:

  • 您好,感谢您到目前为止对我的帮助,关于同时使用版本 4 和 5,我认为这不会发生,因为我在安装 PODS 之前进行了清理,请参阅:'rm -rf ~/Library /缓存/CocoaPods; rm -rf 豆荚; rm -rf ~/Library/Developer/Xcode/DerivedData/*;吊舱解体;吊舱设置;吊舱更新;吊舱安装;'关于编译指令,我需要 2,因为我的文件存在于一个而不是另一个,但我将执行测试以隔离这种可能性,我将很快发布结果。谢谢
【解决方案2】:

我解决了这个问题写作......

[FIRMessaging messaging].APNSToken = deviceToken;

相反...

关于 didRegisterForRemoteNotificationsWithDeviceToken 方法。

谢谢!!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多