我正在使用Cordova开发应用程序。在Android上,Firebase插件运行良好,但我在iOS上遇到了这个问题:
<Error> [Firebase/Core][I-COR000009] The GOOGLE_APP_ID either in the plist
file 'GoogleService-Info.plist' or the one set in the customized options
is invalid. If you are using the plist file, use the iOS version of bundle
identifier to download the file, and do not manually edit the
GOOGLE_APP_ID. You may change your app's bundle identifier to '(null)'. Or
you can download a new configuration file that matches your bundle
identifier from https://console.firebase.google.com/ and replace the
current one.
*** Terminating app due to uncaught exception 'com.firebase.core', reason:
'Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in
GoogleService-Info.plist or set in the customized options.'
我将GoogleService-Info.plist放在项目的根文件夹中,位于.xcodeproj
文件的同一文件夹中。
答案 0 :(得分:2)
对你来说可能为时已晚,但如果有人像我这样来到这里,这个文件应放在你的cordova项目的根目录中。该插件具有钩子,可以在构建期间将文件复制到xcode项目中。
答案 1 :(得分:2)
我通过以下步骤解决了这个问题: