Provide a way to perform actions in Xcode before building

Originator:linde.andreas
Number:rdar://15730125 Date Originated:12/28/2013
Status:Duplicate 14254365 Resolved:
Product:Developer Tools Product Version:
Classification:Feature (New) Reproducible:
 
Summary:
Scenario:
The goal is to create a daily build using Xcode bots for iOS and Mac projects. To be able to identify individual builds we need to provide unique (and increasing) values for CFBundleVersion.

Problem:
One common approach is add a "Post-action" for the "Archive" in the used scheme and patch the `info.plist` of the generated app bundles and also the generated dSYM packages. This is only working if all created targets are actually app bundles and not command line executables (Mac platform) which need the info.plist data to be embedded into the executable. So this is NOT working for command line executables which are build as part of the main app project as dependencies.

Feature Request:
Provide a "Pre-everything" section where developers can add scripts or other functionalities just like in the usual "Pre-actions" or "Post-actions" for "Build", "Test", "Archive", etc. This should run before "xcodebuild" is called and any files are being read.
Als provide a "Post-everything" section where developers can the same as above.

Benefit:
The developer could define a "Pre-everything" action with a script that patches an Info.plist or any other file adjusting the version number. Then the archive process would be executed and all targets could use the same CFBundleVersion. In a "Post-everything" action the developer could do a cleanup on the patched files reverting the changes or e.g. call "git reset --hard" so the checked out repository won't be dirty.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!