There is a "run script only when installing" option in Xcode Run script Build Phase, I am not able to find documentation on this. What does it do?
Go to the Build Phases section of your project. (Click on the project, then on the main target, then on the “Build Phases” tab along the top.) Click the + at the top left to create a new build phase; choose “New Run Script Phase.” Xcode creates the script at the end of the list, naming it “Run Script.”
you can run as many bash scrips as you like at any point in the build phase. select your target, then either: from the menu: Editor -> Add Build Phase -> Add run script build phase.
In Xcode, you specify the files and scripts for your target using build phases. The build system then uses that information and other build settings to determine the tasks required to build the target.
Xcode uses the set of input and output files to optimize build times, by running your script only when necessary. If you don't specify input or output files, Xcode runs your script every time you build the target. For more information, see Improving the Speed of Incremental Builds.
With Run script only when installing checked, the script only runs when do Product Archive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With