On Jan 21, 2013, at 22:15 , Oleg Krupnov <oleg.krup...@gmail.com> wrote:

> I have a XIB file with some debugging & tweaking window which is only
> needed in the Debug configuration of my project. I can exclude the
> debug code with some #ifdefs, but I would like also to exclude the XIB
> from the release build. Is there a way in Xcode to achieve this?

You could add a script phase after the copy resources phase of the target. 
Something like:

        cd "$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"
        rm -fv */MyWindow.nib

(assuming the nib is localized), and check "Run script only when installing".

This doesn't exactly keep the nib file out of the release build. Rather, it 
keeps it out of the archive build, which is the fully-processed app you 
presumably generate to distribute.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to