【问题标题】:firebase crash reporting supporting multiple environments支持多种环境的 Firebase 崩溃报告
【发布时间】:2017-04-21 05:43:27
【问题描述】:

Google 声明执行以下操作。 https://firebase.google.com/docs/configure/#support_multiple_environments_in_your_ios_application

我只想有 1 个目标,并为 GoogleService plist 文件使用不同的名称,谷歌随后会解释。

但是,只要添加了崩溃报告依赖项并且 google 服务 plist 的名称不完全是 GoogleService-Info.plist,脚本就会失败并说明错误

SERVICE_PLIST: GoogleService-Info.plist could not be located.

为什么 google 说你可以通过更改名称来支持多种环境,但崩溃报告是硬编码默认的 GoogleService plist 名称?

有解决办法吗?

【问题讨论】:

  • 您找到解决方案了吗?目前我也有这个问题。
  • 卡利斯,我用谷歌开了一张票。他们说他们已经意识到这个问题并正在研究解决方案。目前,没有很好的解决方法,而且他们没有说明修复的预计时间......所以我们只需要等待,看看并检查 firebase 的更改日志。

标签: ios iphone xcode firebase firebase-crash-reporting


【解决方案1】:

如果您有 1 个目标和多个构建配置,则此解决方案将起作用。

因此,如果您仔细查看 upload-sym 文件,您会注意到只有在找不到 ${FIREBASE_API_KEY}${FIREBASE_APP_ID} 时,它才会搜索 GoogleService-Info.plist 文件。 所以我设法通过在用户定义的设置Editor -> Add Build Settings -> Add User-Defined Setting 中添加FIREBASE_API_KEYFIREBASE_APP_ID 来修复它。

FIREBASE_API_KEY=API_KEY from your GoogleService-Info.plist
FIREBASE_APP_ID=GOOGLE_APP_ID from your GoogleService-Info.plist

所以我有 GoogleService-Info-production.plist 和 GoogleService-Info-development.plist。 为适当的配置复制正确的。崩溃报告对我有用。 希望这对其他人有所帮助。

【讨论】:

  • 你是救生员卡利斯
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-11-07
  • 1970-01-01
  • 2020-12-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多