Creating multi-variants of an iOS app from a single Xcode project

iOS SDKWhen someone at work asked me about creating multiple variants of an iOS app  from a common codebase (ie. from a single Xcode project), I thought couldn’t this be achieved through defining multiple targets in that Xcode project?

I have done this before for a project where I created a “lite” version and an “HD” (iPad-only) version from a full-featured iPhone codebase I originally created. I was about to document the process on this post before coming across this blog post from Just2Us, which does a great job in explaining the entire process. Instead of duplicating the content, just refer to the blog post.

One thing I would do differently from what is described in the referenced post is that instead of adding a new target, I would recommend duplicating an existing target – this way I avoid the hassle of configuring the new build target and including the files to my target phases manually.

Duplicating a build target in Xcode

I have also created a project to demonstrate the multi-target in Xcode. You can download the file here.