How to use two different GoogleService-info.plist file in ios swift project for dev n prod?

别来无恙 提交于 2019-12-06 01:36:48

问题


I need to use two different GoogleService-info.plist for working with dev and prod builds, currently I'm separating dev and prod by just changing "build configuration" in edit scheme, but now I need to have two different .plist files for dev and prod for working with google analytics, pushwoosh etc,


回答1:


For this case you need use different Targets with diff bundle id in project for Dev and Prod.
After that you will can link GoogleService-info.plist for this targets. And also I recommend create different folders in project directory Look at pictures. The first you create targets Prod and Dev

After create diff folders in project dict let's call them GoogleProd and GoogleDev and copy your .plist file to diff folders and drag to project. First file you need link with TestProd target

And the second file link with TestDev target

The final project directory will look like



来源:https://stackoverflow.com/questions/39362013/how-to-use-two-different-googleservice-info-plist-file-in-ios-swift-project-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!