Clicky

iOS Dev Nugget 139 Custom Build Configurations and Xcode Subprojects

.

Need to run a code review on your codebase? Hire me

If you have an Xcode project that includes another subproject and you have defined custom build (for e.g., I often define Appstore and Adhoc) configurations on top of the default Debug and Release configurations, be prepared for an error while building using custom build configurations.

What happens is Xcode will build the subproject(s) using the same build configuration name, e.g. if I build Adhoc, Xcode will try to build Adhoc for the subproject too and failing which, fallback to Release. This might not be what you want.

The easiest fix is to modify your subproject so they have the same custom build configurations.

A more elaborate method to fixing this is to use a custom build script that runs xcodebuild, passing in the -configuration switch. @raizlabs has a good write up about how to do this.


Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No

.

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues