How do i change my app's bundle ID? - iphone

I'm making a pro version of my app and a free version, whereas i just had the free version, which is already on the app store. So how do i change my bundle ID for the pro version of my app. Do i have to do something inside of xcode?

The best way to do this is to create a new target. In Xcode, just go to File --> New Target.
This will create a separate target with a new main and info.plist. In there you can specify the app bundle ID for your pro version. Then in the target dropdown (the one you use to specify which to device to debug on) you can specify which target you want to debug and eventually build/submit for.
This creates a clean separation of your Pro and Lite builds, while being able to share the code you have already created. For each of your files, you'll need to specify which (or both) targets they need to belong to.

The answer above works; however, might I suggest you use in-app purchase to activate the paid features? That way existing users of your software will get an upgrade notification from Apple (that they should install the new version). I imagine most users interested in paying for your paid features are the same ones who are currently using your free version.

Related

Multiple appstore application versions - regular and certified

I have to get a certification for my app for government customers. So there will be two (similar) apps in the app store - regular (development) version and a certified (frozen) version.
My question is - what should be different in the new app?
- new app name (e.g. My Certified App)
- new bundle id (com.mycompany.my-certified-app)
- new push certificate for the server?
- new images?
I have never submitted a lite/full version app before, maybe this type of thing is all too common.
Thanks!
You just need a different bundle ID to make two apps (they'll need to have different names in iTunes too, but the name on the homescreen / in the project can be the same).
You can create a new target for your app, and that will give you a second info.plist. That lets you specify different bundle IDs for the two versions without needing to physically copy and paste the whole project.
However you may have trouble getting this approved by Apple if both apps are identical apart from the version number / certified status.
If one app is just for testing, can't you use TestFlight or something similar to allow your customers to try the app in beta before it's certified?
I would suggest adding "- Certified" to your app name. There are plenty of examples in the iTunes store of full versions, and "- Lite" versions.
In addition to the name, it is customary to have the app icon reflect the different versions.
SeeRoboKill, and RoboKill Lite as one example.

Apple store update?

I have an app in apple store, I want to update it. But instead of working on old project, I created a new project and now it is finished. If I upload the new one, does apple reject it because of different sku and appids. Older version was very bad and I created totally new app. What should I do to update my application?
In your apps Info.plist, you want to make sure that the Bundle Identifier between the two apps match, and that the new app has a higher version than the old app. Then you should be able to successfully submit your new version to Apple.
I think you need to make sure:
your application identifier is the same
you sign it with the same developer certificate/identity
new version > old version

App Deployment Question: Lite Vs Paid

I am developing a messaging app. It uses an SQLite database to store the user's registration. It also uses push notifications. Right now I am using a development push notification certificate.
My client now wants a "Lite" version to be built, and I am not sure how to go about it. I have read several articles on Stack Overflow and elsewhere. I am confused by all the versions I have read online.
Can anybody suggest to me what to do, specific to my situation? I don't want to lose the registration data in the database while updating from Lite to Paid version.
One more question: when someone downloads a paid version of an app, will it install as a different app or will it overwrite the existing Lite version? I am guessing it depends whether you are using a separate app ID or the same one, but I am not sure.
Please help.
Thanks.
To your first question, what I do is just create a second target in my Xcode project. One for the Lite version and one for the paid version. Then I create a preprocessor macro for the Lite version in the Xcode build settings for the Lite target. Usually I just do LITE=1. Then in the code when I want to do something different for the Lite version, you can just do
#ifdef LITE
//lite version
#else
//paid version
#endif
And for your second question, the paid version will not overwrite the Lite version. It will be installed as a different app.
EDIT: You should consider having just one free version and providing the "paid" features via an In-App purchase. This would allow the user's preferences to migrate over from the Lite to paid version since it would actually be the same app.

What's the best way using XCode to install multiple builds of the same iOS app to your iPhone?

I frequently find that I need to have a build on my iPhone which is my 'demo-ready' version which might point to my demo server. I also want a build that is the latest and greatest debug build that I'm developing with that points to my development server. Has anyone found a really simple way for me to install two apps that perhaps are the exact same code but point to different servers? Alternately perhaps I would have an app that was a few versions behind the latest version? Preferably I would use the same XCode project to build and install onto the iPhone.
You can add special build configurations for them that each use a different info.plist file. So, maybe for your demo, you have an info.plist named MyApp-Info-DEMO.plist and MyApp-Info.plist for the release.
Then you could add your server variable as an info.plist variable and look it up when the app starts. Or even just create a DEFINE statement in your new configuration that's something like SERVER=demo.myserver.com for the demo and SERVER=production.myserver.com for the live.
The most important part is to change the CFBundleIdentifier in the new info.plist. So in your demo, you could name it something like com.mycompany.myapp.DEMO and the real one might just be com.mycompany.myapp.
This will allow both versions to appear on the phone at the same time (the different CFBundleIdentifiers). Just remember, if you are using in-app purchases or server push notifications, you won't be able to do this without a separate, specific profile for both your real app identifier and your demo one.
You could create 2 different targets with 2 different info.plists and 2 different preprocessor defines (in the Build Settings for each of the 2 targets). Then ifdef on the preprocessor defines to select the server constant the compiler uses for each target.
Then make the product name and the bundle ID different in the two different target settings (so that neither the device or the Simulator will confuse the two app bundles).
With the current version of Xcode, you'd achieve this by changing the app's Info.plist file to use a different bundle identifier (and possibly also change the Product Name of the app in the build settings).
The upcoming version of Xcode, from what I've read in the prerelease documentation, has a feature that may simplify what you want to do quite a bit. However, since prerelease software is covered under NDA, I can't give you any details.

creating a free version of an app, but having the app separate on debug device

I was just making a free version of one of my apps. I copied the folder, renamed the project, and changed the icon file, loading screen, interface, and code. BUT YET it still replaces a build on my phone.
1)how do I stop this from happening (i want both the free and paid version on my phone)
2) if you can fix this, will a customer who has the paid, and downloads the free, will that replace it on their phone?
I really need to know these, as I have the app ready to go, and would like to get it before the end of the week.
cheers
Sam
You need to have a different app bundle identifier. I think that's your problem.
Long answer:
Go into your projectname-info.plist file and change the CFBundleIdentifier.
I'd recommend something like:
com.mycompany.mycoolapp for the app store
com.mycompany.mycoolapp-beta for the beta version
You should actually be able to set up the "Debug" build configuration to use a different info.plist file configured with a different CFBundleIdentifier and a different icon filename. That way you'll automaticlly get the beta ID and icon, etc for the Debug build and the real id/icon for the full one.
This should allow users to install and use both the production and test versions of the apps at the same time without confusion.
You might also find this IPA target template helpful if you're doing ad-hoc distribution to Windows users for testing:
http://devblog.appmagination.com/2010/01/target-template-for-building-iphone-ipa.html