At the moment, iTunes store has no mechanism to provide free trials to users. Developers have three choices to offer similar experience:
- Refund? Actually, there are no refunds allowed on the iTunes store as stated on Apple’s policy. Even though some customers did successfully receive their refund, but some didn’t.
- Offer a limited time free download on your app initially.
- Create separate Free and Paid versions. Free version should have some basic but useful functionality, and hopefully the user will find it useful enough to purchase the paid version with premium features.
In iPhone OS 3.0 beta, which was announced recently, does not solve the issue of providing demo/free trials to users. (Even tough they released a new feature called In-App purchase, which is an addition to the current single-sales purchase model. It provides developers a flexibility on how to charge users. But In-App purchase will be only available on paid app.)
We use the free/paid model on Darkroom, the camera app that saves our user’s time by shooting clearer picture every time. In term of its development, we have to minimize the maintenance cost. The goal is to maintain one set of source code, but be able to create both free and paid versions from it. The building work flow has to be as easy as possible, and we need to decrease the possibility of making errors. Here’s our way of making it possible:
- Use macro preprocessor and #ifdef to special case the code. We use something like:
#define PRO
#ifdef PRO
specific code for paid app
#else
code for free app
#endif - Rather than defining the macro in PCH file, where you will need to manually comment out when building the free version, you can specify it on the build targets instead. There will be two targets, Free and Paid versions, for Debug and Distribution targets.
- Go to Project Info by double click the project’s name. Go to the Configurations tab and duplicate the “Debug” Config. Rename the newly copied configuration as “Debug: PRO”. You can also rename the old “Debug” as “Debug: FREE” for clarity.
- In the Build tab, choose “Debug: PRO”, then search for “Preprocessor Macros”. Add “PRO” keyword and press OK.
- Try to build both the free and paid versions and test them.
Now that you have made the functionality of your free and paid versions different, you still want to differentiate between these two versions by their names and icons, right? So, do you need to swap the Icon.png and product name every time you build for distribution? The answer is… No.
- First create a new icon for the paid version. Let’s name it something like “Icon-PRO.png”.
- Copy the “Info.plist” to “Info-PRO.plist”.
- Add “Info-PRO.plist” to the project with “Add Existing Files”. Untick the project in “Add To Targets” .
- Open the file on Xcode, change the property “Icon file” with the value “Icon-PRO”.
- Go to Project Info again. In the Build tab, choose configuration “Debug: PRO”, then search for “Info.plist File” setting, add the value “Info-PRO.plist”.
- Search for the product name (e.g. “Cool App”) and change it to something you want for the paid version (e.g. “Cool App PRO”).
- Go to Targets group, and double click on the target. Go to Build tab, and change the “Info.plist File” and “Product Name” as well.
- Close the project and re-open it again.
Now try to build the paid version and see if the new icon and name shows up.
UPDATE (30th of March, 2009): Make the steps much simpler.

Michael Nachbaur
May 5th, 2009 at 4:00 pm
This looks great! I was wondering if you found a way to change the default.png splash screen via your build configuration?
Leon Ho
May 6th, 2009 at 9:18 pm
@Michael: You can create a shell script and attach it on the building process:
http://adeem.me/blog/2009/05/03/tutorial-part-2-same-xcode-project-create-multiple-products-for-iphone-using-script/
Ivan
June 4th, 2009 at 9:18 am
Gr8 tutorial, thanks. I have one question – will Apple accept PRO and FREE versions of your app built the way you described it? I mean, there won’t be confusion about free vs. paid app build, right?
Also, we would need to create different code signing, provisioning etc… for both builds or not?
Ivan
June 4th, 2009 at 9:31 am
in addition – I see that both builds would have the same name. Is this OK with the AppStore? I thought that FREE version would have to have “free” or “lite” etc suffix?