Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

xcode

ios

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.

like image 728
Ish Avatar asked Nov 10 '10 00:11

Ish


People also ask

Can I install an app twice on my iPhone?

Answer: A: If you mean that you want to download the same app twice on the same device, you can't do it. But you do not need to download that app twice.

Can I upload a new build with same version after Apple's app review is done?

After creating a new version you can submit it with your latest build & also update all the details which you desire & all those will be reviewed & made live once apple review those. Can't I add new build under existing version ? @pcj No you can't do that.

Can you make iOS apps with Xcode?

The Xcode developer tools include everything you need to create apps for iOS, iPadOS, macOS, tvOS, and watchOS.


1 Answers

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.

like image 84
Jason Coco Avatar answered Oct 03 '22 17:10

Jason Coco