Swift 2.3在pod更新后使用未解析的标识符Firebase'FIR'
问题描述:
在我的项目中使用Xcode 8和Swift 2.3并使用Firebase 我刚做了pod更新并获取了很多错误,但无法找出原因?Swift 2.3在pod更新后使用未解析的标识符Firebase'FIR'
如果此错误是由于更新,如何恢复到以前的版本?
波德文件
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/AdMob'
只是做荚更新,得到了下面
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
谢谢你的回答真的帮了我很多。 你也可以考虑投票吗?所以它会出现并帮助像我这样面临问题的其他人 –