繁体   English   中英

适用于iOS的cordova-firebase-plugin配置

[英]cordova-firebase-plugin configuration for iOS

我正在开发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文件的同一文件夹中。

对你来说可能为时已晚,但如果有人像我这样来到这里,这个文件应放在你的cordova项目的根目录中。 该插件具有钩子,可在构建期间将文件复制到xcode项目中。

我通过以下步骤解决了这个问题:

  1. 在项目根文件夹中添加GoogleService-Info.plist文件。
  2. 为ios平台创建构建。
  3. 运行项目在设备上抛出Xcode。 检查是否发生错误。 在以下位置下载新的GoogleService-Info.plist文件替换。
  4. 平台/ IOS /项目名/资源/资源/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM