Make two versions - lite and pro - of the same app
Asked Answered
T

1

7

We have an AdWhirl-sponsored version of an app (Moonrise) and would like to offer an ad-free $.99 version.

For maintenance reasons, I'd like to have a single app in which I just change a couple #defines to turn ads on and off.

But how do I compile to two different 'app packages', so to speak, that have different names and bundle identifiers?

I guess I'm just asking for a heads-up before I try it, and if there is a gotcha I should think of. Also, if there is an even easier way of doing it, I'd like to know (as this should be common among devs).

Plan is to

  1. Create a bundle identifier, change it in the -info.plist
  2. Create a new app with a new name, change bundle Display Name and icon
  3. Make a #define or such to not show ads
  4. Upload to App Store

Have I missed anything?

Torietorii answered 18/8, 2011 at 12:24 Comment(1)
possible duplicate of How do I manage building a Lite vs Paid version of an iPhone app?Iraq
R
9
  1. Create new bundle identifier
  2. Create one more .plist file for your app (you may duplicate existing one)
  3. Change application name, bundle identifier and so on in new .plist file
  4. Add another target (you may duplicate existing)
  5. Find in target settings "Info.plist" entrie and change it to new one
  6. Add some user defined flag in targets settings to mark what one of them is LITE and another is not LITE
  7. Configure schemes for different targets

If you will do everything good, you will be able to use single project to build different versions of it.

Rolfe answered 18/8, 2011 at 12:38 Comment(3)
Thanks. But it was as I feared, by the merest touching these things it breaks the compiler. Has nothing to do with "doing everything good", sadly. After Duplicating the Target, I got two identically named .app products - should I worry? After setting both targets correctly pointing to the copies changes .plist, I can run it on device only. In simulator mode, it suddenly complains about a directory with a space in it, in the path to the project folder. Also, can you explain what you mean by 7. ?Torietorii
See here: #8456920Kenyakenyatta
A few XCode versions later it works pretty much as you described. I prefer just duplicating the target and drag in files and check the copy checkbox over duplicating files inside XCode, because the project and folder navigator is still buggy. Now we have a nicer file inspector which you can activate and see exactly which targets each file belongs to. Schemes usually don't have to be changed, and source duplicates can be kept to a minimum with #if statements.Torietorii

© 2022 - 2024 — McMap. All rights reserved.