Let There Be Lite
Creating a Lite or Free version (don't call it a 'Demo' on the App Store) of your application is pretty easy to do assuming there your application can support reduced functionality. One way you could do this is just copy your whole project and start modifying your code to make it Lite. The biggest drawback to this is the dual maintenance of code if you have to fix a bug in both the full and Lite versions. The alternative is to create a new target in the same XCode project with different settings. This is the approach I took with Flik.
Fortunately for me, a Lite version of Flik translates into providing just a few levels instead of the full set of levels and so I could focus on those changes.The steps below outline what was done.
Change Your Code
Where your Lite version differs from the full version at the code level, you should add #ifdef areas that are applicable to the Lite version versus the full version. While you can do an explicit #define in your code and change this before compilation, see the 'XCode Build Settings' below to see how to have XCode do this for you.
#ifdef LITE
// LITE logic goes here
#else
// FULL logic does here
#endif
To test that your targets are setup correctly, add this code somewhere:
#ifndef LITE
#error "Not Lite"
#endif // LITEThat will cause your build to FAIL on all non-Lite builds, and SUCCEED (assuming no other compile issues) on all Lite builds. -William (from Apple Forums)
Copy Your Target
In XCode, expand the Targets item and select your application. Right click and say duplicate. At this point you probably should rename this to end in 'Lite' or 'Free'. You may want to rename the Info.plist file as well.

XCode Build Settings
For each Build Configuration that you need (e.g. Debug, Debug Device, Device Ad Hoc Distribution, Device App Store Distribution), you need to change the following settings for the Lite version. This can be found on the Build tab of the Project Settings for your Lite Target (select your target and then select the Project > Edit Active Target ... Lite).
- Info.plist File
- Product Name
You can actually specify "Configuration: All Configurations" in the top left of that screen to avoid the hassle of doing this multiple times. -William (from Apple Forums)

One other item to change on this tab is the Preprocessor Macro. This is the same as doing a #define in your code. See the section aboe on where this can be used in code.

XCode Properties Settings
If you add a space in your product name, this causes an issue in the Identifier field on the Properties tab. This normally starts out with: com.yourcompany.${PRODUCT_NAME:identifier}. If your name is 'App Lite', then this will fail during the upload process to Apple. You should explicitly set this to something unique, following Apple's recommended scheme.

While you are on this screen, you should change the Icon File to the file you will create next.
Graphics and Other Files
You should create a different icon to be displayed on the App Store. The simple way to do this is just add the word 'Lite' to it. You should make sure that this icon is added to just your Lite target and not your full target. Conversely, you should also make sure the Lite icon is not in the full target.

You should do this with all the other images or files that should be in one version and not another. You also need to prepare other images for the iTunes App Store.
That should be it. At this point you should be able to build both your full and Lite versions of your application easily. Just change the Active Target before you build.
June 24th, 2010 - 15:56
Thank a lot!
One note about Default.png (not mentioned in the article)
You can use a different Default.png in Lite version storing it a folder like “Resources-Lite” and add it the Lite target (as normal Default.png is target to normal build)
(The same thing should be with the iTunes Icon for Ad-Hoc distribution)
At the same way you can store the Icon.png in the lite resource folder and use the same name as the full product icon.
(excuse me for my poor english)
June 25th, 2010 - 09:13
Thanks for the clarification and extra info!