Search code examples
iphoneobjective-cxcodexibnib

Handling different xib files for a lite and full version


I have a bunch of xib files that I use in my app's full version. In the lite version I want to be able to load some xibs that have less features, thus making it a lite version. All my viewControllers are hooked up in IB, and are referenced by both targets at the moment.

What's the best way to hide functionality beyond simply disabling it? I figured that having an entirely different xib file would be easiest, am I wrong?

Edit:

To clarify, I'm trying to figure out how to load a different nib for a view controller depending on the version. I believe it has something to do with initWithNib.


Solution

  • Use targets, you can exclude/include files per target.

    Create a target for lite, which does not include some parts that the full app wil, like load a NIB which has les functionality than the full version.

    You can even use the same names for code files (.m) and NIB and include/exclude via the target property.

    This will only work if you have a lite and full version in the app store.

    If you want a in app purchase then you will need to do what @Jack Humphries suggests.