我想在具有iMessage擴展的iOS應用中使用Firebase。我已經包含了GoogleService-Info.plist
文件,並且我可以在主機應用程序中正確使用Firebase。在iMessage擴展中使用Firebase時發生崩潰
然而,當我包括我的iMessage應用信息下面的代碼:在運行時
override func willBecomeActive(with conversation: MSConversation) {
super.willBecomeActive(with: conversation)
if(FIRApp.defaultApp() == nil){
FIRApp.configure()
}
}
應用崩潰並出現以下錯誤
Could not locate configuration file: 'GoogleService-Info.plist'.
*** Terminating app due to uncaught exception 'com.firebase.core', reason:
'[FIRApp configure] could not find a valid GoogleServices-Info.plist in your project.
Please download one from https://console.firebase.google.com/.'
什麼我需要做的使用在iMessage應用程序擴展中使用Firebase?
您的錯誤可能是您獲得的最大幫助......確保已包含「GoogleService-Info.plist」。 – Dravidian
你說得對,我沒有把它添加到擴展目標中!謝謝 – Nilsymbol