ios - Swift 2.3 在 pod 更新后使用未解析的标识符 Firebase 'FIR'

标签 ios swift firebase cocoapods updates

在我的项目中使用 Xcode 8 和 Swift 2.3 并使用 Firebase 我刚刚执行了 pod 更新并收到了很多错误但无法弄清楚为什么?

如果这个错误是因为更新,如何恢复到以前的版本?

Pod 文件

pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/AdMob'

刚刚做了 pod update 并得到了下面

Analyzing dependencies
Downloading dependencies
Using Firebase (4.1.0)
Using FirebaseAnalytics (4.0.3)
Using FirebaseCore (4.0.5)
Using FirebaseInstanceID (2.0.1)
Using FirebaseMessaging (2.0.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 9 total pods installed.

我收到以下所有错误:

Use of undeclared type 'FIRMessagingDelegate'
Use of unresolved identifier 'FIRApp'
Use of unresolved identifier 'kFIRInstanceIDTokenRefreshNotification'
Use of unresolved identifier 'FIRMessaging'
Use of unresolved identifier 'FIRInstanceID'
Use of undeclared type 'FIRMessagingRemoteMessage'

最佳答案

根据documentation , Swift 中 Firebase 4.0.0 的类名更改。所以 FIRMessagingDelegate,现在是 MessagingDelegate,等等。请参阅迁移指南 here

关于ios - Swift 2.3 在 pod 更新后使用未解析的标识符 Firebase 'FIR',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45702386/

相关文章:

ios - Xcode 没有在断点处停止

iOS13 Safari WebSpeechApi 错误 : SpeechSynthesisUtterance won't use provided locale

ios - 被发送到一个不符合 "com"属性的 KVC 的对象

ios - MKMapView 覆盖 SKSpriteNodes

ios - SWIFT:如何向 NSDate 对象添加小时数

firebase - 我们如何在 Firestore 中创建数组中的数组?

javascript - HTML5 表单验证无需提交

Firebase 数据库按更深的子级排序

ios - 如何在更改 UILabel 文本时有延迟

swift - MFMailComposeViewController 错误 [MC] 为捆绑 ID 过滤邮件表帐户