Bug 1891 - BeforeCodeSign Project Operation phase for custom commands
Summary: BeforeCodeSign Project Operation phase for custom commands
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-11-05 03:24 UTC by guivho
Modified: 2015-07-10 14:38 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description guivho 2011-11-05 03:24:34 UTC
On Xcode, I have a build script that manipulates the content of the app's
Info.plist. Basically it leaves the official version number (e.g. 1.2) as value
of the CFBundleShortVersionString key as generated by Xcode, and it sets the
value of the CFBundleVersion key to the current svn revision number.

This script is run after the 'xxx.app' dir has been created and after all
bundle resources have been copied to it.  The script runs before the actual
compilation, linkage and signing phases.

Our MT custom commands do not provide a similar 'Project Operation' phase. The
'BeforeBuild' and 'Build' commands are executed before the 'xxx.app' dir exists.
The 'AfterBuild' command runs after the codesign phase.

So none of these commands can manipulate the plist. Either it doesn't exist
yet, or it's too late while it's after the code sign phase.

I assume that it would be a minor effort to add a 'BeforeCodeSign' project
phase, or at least a phase where the 'xxx.app' dir and 'xxx.app/Info.plist'
file have been created but have not yet been signed. There's no reason why
MonoTouch (MonoDevelop) would not provide the same functionality as Xcode for
external/custom commands.
Comment 1 Mikayla Hutchinson [MSFT] 2011-11-05 11:15:20 UTC
Advanced customizations to the build system like this will be made possible by xbuild support.
Comment 2 cpdigger 2012-07-26 05:59:20 UTC
We also would like to have this feature to be implemented !! 
We want to exclude the complete "settings.bundle" for the Release Version, because we only use it for Debug Version.
Comment 3 Lluis Sanchez 2015-07-02 10:29:07 UTC
iOS project are now msbuild based, but I don't know if we have support for something like a BeforeCodeSign target. Maybe Jeff can give more info about this.
Comment 4 Jeffrey Stedfast 2015-07-10 14:14:28 UTC
We don't currently have a BeforeCodeSign target
Comment 5 Jeffrey Stedfast 2015-07-10 14:38:45 UTC