简体   繁体   English

我是否可以为具有不同捆绑ID的两个iOS应用使用相同的Firebase GoogleService-Info.plist?

[英]Can I use the same Firebase GoogleService-Info.plist for two iOS apps that have different bundle ids?

We run internal tests on our company Testflight while in development that never go live but then launch games on the client's Testflight. 我们在我们的公司Testflight上进行内部测试,而在开发中从未上线,然后在客户端的Testflight上启动游戏。 This results in us having two different bundle ids where the internal bundle id is something like com.mycompany.client.appname and the client's is com.clientcompany.appname . 这导致我们有两个不同的bundle id,其中内部bundle id类似于com.mycompany.client.appname ,而client是com.clientcompany.appname

Normally we add a second GoogleService-Info.plist since Firebase logs a message about this (which IMO should be a fatal error): 通常我们会添加第二个GoogleService-Info.plist,因为Firebase会记录有关此消息的消息(IMO应该是致命错误):

Project Bundle ID org.icivics.ratify does not match any bundle IDs in your GoogleServices-Info.plist files. Project Bundle ID org.icivics.ratify与您的GoogleServices-Info.plist文件中的任何捆绑ID都不匹配。 This will result in an app that will fail to initialize. 这将导致应用程序无法初始化。

However an app went live recently with only the GoogleService-Info.plist for the internal bundle id. 然而,最近一个应用程序上线,只有内部包ID的GoogleService-Info.plist。 Yet the dashboard appears to be properly reporting metrics despite being in an app with a bundle id that doesn't match the one in GoogleService-Info.plist. 然而,仪表板似乎正在正确报告指标,尽管它位于一个捆绑ID与GoogleService-Info.plist中的捆绑ID不匹配的应用中。 Because metrics are still being reported I'm not sure if I should be concerned about this. 由于指标仍在报告中,我不确定是否应该关注这一点。

What are the consequences if we don't push an update with the correct GoogleService-Info.plist? 如果我们不使用正确的GoogleService-Info.plist推送更新会有什么后果?

The GoogleService-Info.plist file for a project contains the information about all iOS apps in that Firebase project. 项目的GoogleService-Info.plist文件包含有关该Firebase项目中所有iOS应用的信息。 When you initialize the Firebase app in your code, it looks for the configuration data for the current app based on its bundle ID. 在代码中初始化Firebase应用程序时,它会根据其捆绑ID查找当前应用程序的配置数据。

If you use an outdated GoogleService-Info.plist in your app, it may not be able to find the information for the app. 如果您在应用中使用过时的GoogleService-Info.plist ,则可能无法找到该应用的信息。 In that case Firebase will fail to initialize and raise an error. 在这种情况下,Firebase将无法初始化并引发错误。

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

相关问题 如何在ios swift项目中为dev n prod使用两个不同的GoogleService-info.plist文件? - How to use two different GoogleService-info.plist file in ios swift project for dev n prod? 由于 Firebase GoogleService-Info.plist,Codemagic iOS 构建失败 - Codemagic iOS build fails due to firebase GoogleService-Info.plist 在XCode中的一个目标中有两个GoogleService-Info.plist - Have two GoogleService-Info.plist in one target in XCode 对不同的构建方案使用不同的 GoogleService-Info.plist - Use different GoogleService-Info.plist for different build schemes 在一个目标(GCM)中拥有两个GoogleService-Info.plist(或更多) - Have two GoogleService-Info.plist (or more) in one target (GCM) Firebase:我应该将GoogleService-Info.plist添加到.gitignore吗? - Firebase: Should I add GoogleService-Info.plist to .gitignore? 在单个XCode项目中使用两个GoogleService-Info.plist - Use Two GoogleService-Info.plist in a single XCode project Firebase GoogleService-Info.plist 文件被盗 - Firebase GoogleService-Info.plist file stolen Firebase 云消息广播由捆绑 ID 或 firebase 项目 (GoogleService-Info.plist) 确定 - Firebase cloud messaging broadcast is determine by bundle ID or the firebase project (GoogleService-Info.plist) 我可以拥有两个具有不同捆绑ID和相同名称的应用程序吗? - Can I have two apps with different bundle IDs and same name?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM