Running script only for an 'Archive' build in Xcode 4

后端 未结 3 1239
独厮守ぢ
独厮守ぢ 2020-12-04 16:50

I have a script that I run using osascript from a Run Script Build Phase in Xcode 4. This script does some checks to try and catch any human-error in plists and suchlike.

3条回答
  •  青春惊慌失措
    2020-12-04 17:19

    1. Add a "New Run Script Phase" to your project's "Build Phases"
    2. Move (drag&drop) your script in the right position
    3. Check the "Run script only when installing"

    If you don't do 3. the script will run all the time, but if you check that box, it will only run when archiving.

提交回复
热议问题