开发者

Manage build target variables in iphone project

开发者 https://www.devze.com 2022-12-31 10:55 出处:网络
We\'re transitioning to an automated build process for our iphone projects.These projects can be checked out by individual devs, in which case all the API URLs need to point to a certain path.There ar

We're transitioning to an automated build process for our iphone projects. These projects can be checked out by individual devs, in which case all the API URLs need to point to a certain path. There are also a variety of build environments, each with their own API root paths.

I could probably add multiple, different build targets, and have each of them include a d开发者_StackOverflowifferent URLs definition file, but this seems like a lot of upkeep and a bit overkill.

Any best practices out there for swapping a few environmental variables for different build environments without much fuss?


Xcode Configuration Files are probably what you are looking for. They put build settings in a text file for easier management.

Also: https://stackoverflow.com/questions/tagged/xcconfig


In Project tree > Targets > high light a target > Cmd-I > in Build tab ...

scroll to "GCC 4.2 - Precessing" > Preprocessor macros

just add as much as needed, e.g.

  TARGET=8
0

精彩评论

暂无评论...
验证码 换一张
取 消