【问题标题】:Firebase - Multiple Projects (dev and prod) same app targetFirebase - 多个项目(开发和产品)相同的应用程序目标
【发布时间】:2018-02-21 00:08:45
【问题描述】:

我正在查看有关如何实现此目的的 Firebase 文档 (see here)。这是指令:

If the builds are part of a single target, the best option is to give both configuration files unique names (e.g. GoogleService-Info-Free.plist and GoogleService-Info-Paid.plist). Then choose at runtime which plist to load.

但是,在页面末尾,此实现有“警告”:

On iOS, do not add GoogleService-Info.plist to your project if you are supplying different configuration at run time, as this can result in an apparent change of GOOGLE_APP_ID and result in lost Analytics.

由于我试图将多个环境添加到现有应用程序(在 App Store 中),并在其项目中添加了 GoogleService-Info.plist,这是否意味着我不能这样做,因为它会导致丢失分析?或者,我可以简单地删除 GoogleService-Info.plist 并添加环境特定的,没有任何问题吗?

【问题讨论】:

    标签: ios firebase firebase-analytics


    【解决方案1】:

    建议使用 GoogleService-Info.plist,因为它允许 Google Analytics(分析)报告早期事件。如果您在运行时配置它,例如从 Google App ID A 切换到 B,那么您将丢失在使用 B 配置之前记录的 A 事件。这更像是一个警告,让您知道使用运行时 API 的风险。

    【讨论】:

      猜你喜欢
      • 2020-10-06
      • 1970-01-01
      • 2020-08-23
      • 1970-01-01
      • 2021-02-06
      • 1970-01-01
      • 2019-11-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多