【发布时间】:2017-01-26 11:04:35
【问题描述】:
我正在尝试在具有 iMessage 扩展程序的 iOS 应用中使用 Firebase。我已包含 GoogleService-Info.plist 文件,并且能够在主机应用程序中正确使用 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。 -
你说得对,我没有将它添加到扩展目标中!谢谢
标签: ios objective-c swift firebase imessage