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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With