Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-19-2008, 02:26 PM   #2 (permalink)
RickMaddy
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,122
Default

Don't create a separate project. Just add a second target to the existing project.

In the build settings for the new target change the "Product Name" setting to "ProductLite" or something similar.

You should also end up with a new file in resources named "Copy of Info.plist" (or something similar). I usually rename this to "InfoLite.plist". Then in the build settings for the new Lite target your created change the "Info.plist File" setting to match whatever you renamed the file to.

You'll want to create an IconLite.png and update the InfoLite.plist to reference the new icon file.

With this all in place you should now be able to build two targets - the full version and the lite version. They will now have different app names (based on the Product Name change so they can both be deployed at the same time. They will have unique bundle ids so they can be submitted to Apple as separate apps.

Now the last part. For the Lite target, edit the build properties. Scroll way down the list of settings to the "GCC 4.0 - Language" group. Make sure "All Configurations" is selected and edit the "Other C Flags" setting. Set it to something like:

-DLITE_VERSION

Now in your code you can do things like:

Code:
#ifdef LITE_VERSION
    // Code specific to lite version
#else
    // Code specific to full version
#endif

// Or

#ifdef LITE_VERSION
    // Code specific to lite version
#endif

// Or

#ifndef LITE_VERSION
    // Code specific to full version
#endif
RickMaddy is offline   Reply With Quote
 

» Advertisements
» Online Users: 629
20 members and 609 guests
aijo, alphy, apatsufas, armmzz, brianmethod, chits12345, ckgni, claudia99, Dani77, devangvyas, Domele, drewrico, ghost, JamesCahall, lilianprice, oceanlablight, Oral B, rky, SoulRed12, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,786
Threads: 89,205
Posts: 380,599
Top Poster: BrianSlick (7,129)
Welcome to our newest member, lilianprice
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.