Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Is there a good way to duplicate an xcode project so i can use the same basic game, but cut out a bunch of stuff for a "lite version".
i've tried just copying the folder and renaming the xcode file, but when I build there is only 1 version of the app on the simulator - it just replaces the "full version".
Post edited by rjgrune on
Check out one of my Apps!
BlackOut, or <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293047953&mt=8"
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:
#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
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:
I'm not quite sure where this is in my build settings. I highlight my targetLite and click the info button to edit the build settings. "All Configurations" is selected...where do I find the "Other C Flags" settings?
Also, at this point before doing your last step when I build to the simulator for my TargetLite I always get an "Error From Debugger: Failure to launch simulated application: Unknown Error"
Thanks for this, I am much further along then I was before.
Check out one of my Apps!
BlackOut, or <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293047953&mt=8"
The GCC 4.0 sections only seem to show up if you select the right combination.
On your main project window select the drop down list that lets you quickly pick the SDK, configuration, and target. Select the one the says "Use Project Settings". The drop it down again and select your new Lite target leaving all the others checked as-is. Now your build settings should include all of the GCC 4.0 sections in the settings list.
Hey RickMaddy, thanks for the tip!!! Helped a lot.
Here is another tip: How to maintain two Default.png files, one for the full version and another for the Lite version in the same project:
- Create a Default.png file for the full version and a DefaultLite.png file for the Lite version. Add both to the Resources folder in your xcode project. - Right click on your lite app Target, click Add, New Build Phase, New Run Script Build Phase. - Paste this code in the script field:
Using this method is it possible to selectively add which resources get copied into the binary? For example, our game binary is about 40 megs, if we were to do a Lite version, we can probably knock it down to under 10 megs by removing stuff we won't need in the Lite version.
If its possible, any suggestions as to how to do it? Thanks.
If you right click on a file and select "Get Info" you will see a Targets tab. Select that tab. Then check/uncheck the appropriate targets for that file.
One thing I can't seem to get working is using a different icon for the Lite version. I am using 'iconLite.png' for the Lite, and the full version uses 'icon.png'. I am seeing the default white blank icon when I do this.
Ah jeez, I suck. The icon for the lite version was set to full version's target, so it never got included when building the lite.
Thanks RickMaddy. Your post made me go check everything and was able to find it. Sorry for wasting your time. Its always the little things that one forgets. ;)
One thing I had trouble with was using Project->New Target... to create the new target. This was failing consistently. Turns out the info.plist that gets created when you do this isn't complete. Instead, selecting the original target and choosing "duplicate", then following the rest of the directions, works fine.
The GCC 4.0 sections only seem to show up if you select the right combination.
On your main project window select the drop down list that lets you quickly pick the SDK, configuration, and target. Select the one the says "Use Project Settings". The drop it down again and select your new Lite target leaving all the others checked as-is. Now your build settings should include all of the GCC 4.0 sections in the settings list.
Alternatively, you can just create a user-defined entry named "OTHER_CFLAGS"
always grateful of rickmaddy's answers. I tried this, but i just get "failed to launch simulated appliation: unknown error" when i try to launch my new lite target.
when creating the target, so i have to specify what to build? I tried adding my full version app as a dependency, but that didnt work either.
1. if you create your new target from the top menu, you'll have to drag all the resources, files from your original target to the new target. This is how it knows what to build.
2. i didnt try it, but I think you could just right click on the original target and click duplicate. This is save some trouble.
1. if you create your new target from the top menu, you'll have to drag all the resources, files from your original target to the new target. This is how it knows what to build.
2. i didnt try it, but I think you could just right click on the original target and click duplicate. This is save some trouble.
Step 2 worked for me, I'm using the latest xcode for iphone os 3.0
Should the bundle identifier be changed also? My bundle identifier is com.clickspace.tapforms for my regular. Should the lite one be something like com.clickspace.tapformslite?
It would be nice if a user could upgrade to the full version and keep their database. But I guess that's not really possible. Well, I can keep the backup function in the lite version so they could backup their database and then restore to the full version if they upgrade.
I'm having trouble creating a lite version that does not replace my full version. I copied the folder for my full version and in this I changed the code for my lite. I created a new target by duplicating the old and renaming it to lite I also changed the Bundle identifier but it does not seem to matter they both still overwrite the other if I try to install it on my device.
I read above that Product Name should be changed but Product Name is Blank in my full version. I tried to add a value there but it did not seem to make a difference.
I'm also noticing that under products the two .app files have the same name.
Did you change the icon property in the corresponding info.plist for the lite version? Make sure the case matches too.
I created 2 apps, version a and version b. Using this method, of creating a different target for each version. When debugging, and even in release mode, the icon in the device is the one I set on the infoVersionA.plist, and infoVersionB.plist. But after uploading the app to the appstore, the icon that appears on the appstore on the device is the same for both apps. So for example, I have one icon named, icon.png, and another iconVersionB.png. I included both files, both the .plist files define which icon is which. Do I need to do something else, or is this an appstore error? Any ideas. Also, If I download the apps from the AppStore, once installed on my device, the icons are correct for each version.
I created 2 apps, version a and version b. Using this method, of creating a different target for each version. When debugging, and even in release mode, the icon in the device is the one I set on the infoVersionA.plist, and infoVersionB.plist. But after uploading the app to the appstore, the icon that appears on the appstore on the device is the same for both apps. So for example, I have one icon named, icon.png, and another iconVersionB.png. I included both files, both the .plist files define which icon is which. Do I need to do something else, or is this an appstore error? Any ideas. Also, If I download the apps from the AppStore, once installed on my device, the icons are correct for each version.
Thanks.
Dude, you're not making two xcode projects are you?
Dude, you're not making two xcode projects are you?
Nope, is just one project, with 2 targets. With conditional compiling, and different info.plist files. They work pefectly, and downloading the app from the appstore works as expected, with the correct icon. The problem is the icon that appears in the Appstore on the device. It appears as if the Appstore looks just for an icon.png file, instead of the icon file I set on the info.plist
[snip]The problem is the icon that appears in the Appstore on the device.[snip
Confused. Do you mean that when you go to the appstore using your device, that the icons for both a and b are the same? Yet when downloaded they are different (and correct)?
Is it possible that you used the same 512x512 appstore .jpg for both when uploading?
"Hardware will break. Software comes broken" Unknown
Confused. Do you mean that when you go to the appstore using your device, that the icons for both a and b are the same? Yet when downloaded they are different (and correct)?
Is it possible that you used the same 512x512 appstore .jpg for both when uploading?
They look the same in the appstore listing, on the device. The 512x512 images are correct, and they show correctly on iTunes, on the mac. So since the icons that appear on the appstore listings on the device come from the bundle, so I think the problem has to be related with targetting 2 apps.
Sounds like your first theory was well founded... the appstore app must use Icon.png, I wonder what happens if there isn't an Icon.png in the bundle? One would hate to experiment with a live app but if you didn't use Icon.png in either app would they show anything?
"Hardware will break. Software comes broken" Unknown
Did you include Icon.png and iconVersionB.png in both targets? Make sure that each one is in its own target so that your bundle will only include one or the other, but never both.
Did you include Icon.png and iconVersionB.png in both targets? Make sure that each one is in its own target so that your bundle will only include one or the other, but never both.
I included both by mistakes. Since on my tests the icons looked correctly on the device, I will upload a new version without both files to see what happens. I only hope it works, because if not, I will be having an iconless app on the listing. Here are the 3 apps from the same project, with 3 different targets. I explained my problem with 2 targets, just to make the example easier, but the actual problem is with 3 apps. So one app has the correct icon on the app store on the device, the other 2 do not.
Replies
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:
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAlso, at this point before doing your last step when I build to the simulator for my TargetLite I always get an "Error From Debugger: Failure to launch simulated application: Unknown Error"
Thanks for this, I am much further along then I was before.
BlackOut, or <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293047953&mt=8"
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeOn your main project window select the drop down list that lets you quickly pick the SDK, configuration, and target. Select the one the says "Use Project Settings". The drop it down again and select your new Lite target leaving all the others checked as-is. Now your build settings should include all of the GCC 4.0 sections in the settings list.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeHere is another tip: How to maintain two Default.png files, one for the full version and another for the Lite version in the same project:
- Create a Default.png file for the full version and a DefaultLite.png file for the Lite version. Add both to the Resources folder in your xcode project.
- Right click on your lite app Target, click Add, New Build Phase, New Run Script Build Phase.
- Paste this code in the script field:
mv ${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/DefaultLite.png ${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Default.png- Move the "Run Script" phase you just created right after to "Copy Bundle Resources"
That's it, everytime you build the project with the Lite app target it will copy the DefaultLite.png and rename it to Default.png in your build dir.
Send emails with emoji that can be seen
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeIf its possible, any suggestions as to how to do it? Thanks.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThis thread has helped a lot.
One thing I can't seem to get working is using a different icon for the Lite version. I am using 'iconLite.png' for the Lite, and the full version uses 'icon.png'. I am seeing the default white blank icon when I do this.
Any ideas?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThanks RickMaddy. Your post made me go check everything and was able to find it. Sorry for wasting your time. Its always the little things that one forgets. ;)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAlternatively, you can just create a user-defined entry named "OTHER_CFLAGS"
Voodoo Doll: a stress-relief toy for the iPhone.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI tried this, but i just get
"failed to launch simulated appliation: unknown error"
when i try to launch my new lite target.
when creating the target, so i have to specify what to build?
I tried adding my full version app as a dependency, but that didnt work either.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome1. if you create your new target from the top menu, you'll have to drag all the resources, files from your original target to the new target. This is how it knows what to build.
2. i didnt try it, but I think you could just right click on the original target and click duplicate. This is save some trouble.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeStep 2 worked for me, I'm using the latest xcode for iphone os 3.0
deal.gameweaver.com
guessem.gameweaver.com
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeIt would be nice if a user could upgrade to the full version and keep their database. But I guess that's not really possible. Well, I can keep the backup function in the lite version so they could backup their database and then restore to the full version if they upgrade.
http://www.tapforms.com
http://twitter.com/brendand
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI read above that Product Name should be changed but Product Name is Blank in my full version. I tried to add a value there but it did not seem to make a difference.
I'm also noticing that under products the two .app files have the same name.
what am I missing?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThanks.
My Apps: Tilt Meter Pro
:apple:Unibody M
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomedeal.gameweaver.com
guessem.gameweaver.com
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeMy Apps: Tilt Meter Pro
:apple:Unibody M
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeIs it possible that you used the same 512x512 appstore .jpg for both when uploading?
Calc-12E <-- ditch your old calculator.
<a href="htt
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeMy Apps: Tilt Meter Pro
:apple:Unibody M
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeCalc-12E <-- ditch your old calculator.
<a href="htt
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomehttp://www.tapforms.com
http://twitter.com/brendand
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeBad Icon
iTunes Store/Bubble Level
Bad Icon
iTunes Store/TiltMeter
Good Icon
iTunes Store/TiltMeter Pro
http://www.tiltmeterapp.com
My Apps: Tilt Meter Pro
:apple:Unibody M
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome