Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you have iOS 2 different targets with the same product name in Xcode 4.3.2?

Tags:

xcode

ios

lldb

I have a project with 2 targets for an iOS app: Pro and Lite:

They have the same product name. They have different icons. They have different bundle ids.

I used to just be able to switch the scheme on the top left in Xcode to run either the Pro or the Lite version, and they could coexist on one phone as two completely separate apps.

I just updated to Xcode 4.3.2 and now all kinds of stuff is going wrong. Sometimes I see 2 apps on the iPhone. Sometimes it overwrites the previously executed target with the new one. Sometimes it shows the wrong icon (Pro icon with Lite code).

I didn't change any code since I updated Xcode.

Did Xcode 4.3.2 break this?

like image 342
lmirosevic Avatar asked Apr 13 '12 09:04

lmirosevic


People also ask

How does Xcode choose target?

Go to project's settings in the Project Navigator panel. Under the Targets sections, right click the existing target and select Duplicate to copy your existing target. 2. Xcode will ask you if your new target is for iPad development.

What is the difference between project and target in Xcode?

A project is a set of files and general preferences. A target is a subset of the files, and specific preferences (which override the project preferences). Each target builds a product, which may be a library, executable, or framework.

How do I add a target to my Xcode project?

You can access Target Membership by selecting file and opening the right menu in Xcode (the menu is called Inspectors ). Then, in File Inspector at the bottom of the menu, find Target Membership . It's very important to check all files in your project because without this you won't be able to build a new app target.


1 Answers

Turns out you need to ensure your 2 targets have unique bundle ids as well as unique product names.

To get the apps to have the same name on the iPhone springboard, you can set the bundle display name to the same string.

like image 106
lmirosevic Avatar answered Sep 30 '22 04:09

lmirosevic