2017-08-15 95 views
0

在我的項目中使用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' 

回答

2

據爲documentation,類名稱的變化Swift中的Firebase 4.0.0。所以FIRMessagingDelegate,現在是MessagingDelegate,依此類推。請參閱遷移指南here

+0

謝謝你的回答真的幫了我很多。 你也可以考慮投票嗎?所以它會出現並幫助像我這樣面臨問題的其他人 –

相關問題