R – Best way to generate both “free/demo” and commercial apps from the same source code

app-storecocoa-touchiphone

I would like to provide two different versions of my iPhone app on the App Store — one free that is limited by the number of items displayed through the application, and another one completely unlimited.

The source code for both apps will be exactly the same, the only difference would be the SQLite database that stores the items in the app.

I understand that both versions of the app will need to have different bundle names, and different icons. I'm trying to find a way to avoid completely copying the source code directory to be able to customize some of these things: database, icons, nib strings, etc.

Is there a good way to do this without duplicating everything?

Best Answer

Just create a second target in your project. One can be the full featured application, which includes the full database, and the new target will be your demo build, with the demo database. We do this with Crosswords, and it works fine. You can then keep all your source in one place, and not worry about things getting out of sync.

Related Topic