我想在具有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