Specific compiler flags for specific files in Xcode

前端 未结 3 1020
别跟我提以往
别跟我提以往 2020-12-16 21:00

I\'ve been tasked to work on a project that has some confusing attributes.

The project is of the nature that it won\'t compile for the iPhone Simulator And the iPhon

3条回答
  •  猫巷女王i
    2020-12-16 21:10

    You can define additional compiler flags for individual source files as follows:

    • first select the target you are going to build
    • right click on the source file
    • select "Get Info"
    • click on the "Build" tab
    • define your additional compiler flags

    However it sounds like a better solution in your case is just to duplicate the target and have two targets - one for an actual device and one for the simulator. Inherit common build settings from the project level and just tweak the per-target build settings as necessary.

提交回复
热议问题