How to configure independent sets of runtime settings in Xcode

后端 未结 4 1625
遥遥无期
遥遥无期 2020-12-07 07:47

My iPhone application connects to three different servers, say: production, staging and testing. There is a bunch of confi

4条回答
  •  独厮守ぢ
    2020-12-07 08:33

    It is probably very low tech but I just have a method called apiURL() that returns the URL of the API I want. I have localhost, stage, and production and I simply uncomment the one I want. It's worked well for me so far. I've only forgotten to switch it back a few times. Oops.

提交回复
热议问题