Use different GoogleService-Info.plist for different build schemes

后端 未结 17 759
梦毁少年i
梦毁少年i 2020-12-07 07:49

I am using a build scheme for prod and one for staging (with 2 different bundle identifiers) and I am trying to use a separate GoogleService-Info.plist for each scheme. Is t

17条回答
  •  半阙折子戏
    2020-12-07 08:27

    I think it is not possible to achieve without using the GoogleService-Info.plist. Because before you can begin integrating your iOS app with the Google Sign-In components, you must download the dependencies and configure your Xcode project. And this process shows that GoogleService-Info.plist has a big factor on it.

    So the solutions and idea here in this SO question can help you with your problem. Just moved the main copy of the GoogleService-Info plist out of the app into 2 separate folders, then used the Build Phases "Copy Files" on each target to import the target specific plist into the Resources folder.

    Also check this SO question, it might give you more information/idea to your problem.

提交回复
热议问题