How can we have different Info.plist files for different environments such as Dev, Test, Staging, and Prod?

后端 未结 3 2146
抹茶落季
抹茶落季 2021-02-07 12:18

How can we have different Info.plist files for different environments such as Dev, Test, Staging, and Prod?

I have some settings and a sep

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 13:09

    Try this helper class:

    https://github.com/premosystems/MyEnvironmentConfig

    1. Add Environment $(CONFIGURATION) to info.plist.

    2. Add Environments.plist configuration file, populate with you favorite variable goodness.

    3. Add a convenience category on the MYEnvironmentConfig class exposing strongly typed configuration values.

    4. Initialize MyEnvironmentConfig in appDidFinishLaunching.

提交回复
热议问题