This post describes how we support multiple builds. Most-often you need this if you work for enterprise or release own product line.
We follow these notes to add new builds to one product which has multiple targets/builds. The product is one Xcode4 project. Each build may have own graphics for a customer and may have some special settings like server settings via preprocessor and user-defined variables.
How to Make a New Build
- Copy existing Target – select main project file and find targets sections, then duplicate by right click menu
- Rename target according to customer name
- Remove and recreate Scheme – goto “Product > Manage Schemes …”, finds your’s and remove it, it usually looks like “copy of Main Build”; then press “Autocreate Schemes Now”
- Rename *.plist file, change its name in Target settings, check if *.plist file has “Relative to Project” Location in file settings in File Inspector on the right side of Xcode
- Add necessary Icons, Splash screens and graphics to the project
Not obvious, but quite easy. I’d not publish this note if it’s so simple. We faced to problems that prolong this process from 10 minutes to about 30–40 minutes.
That’s why I want to give you a list of notes that makes things solved faster by reading this:
- When splash screens are not shown it’s need to check names. For example for product name of customer-X we have ProductX target/build: “ProductX-Default.png” – is right settings for iPad in *.plist, but file names are “ProductX-Default-Landscape~ipad.png” and “ProductX-Default-Portrait~ipad.png”. They’re recognized automatically.
- Entitlements file must be written with its extension – “Entitlements.plist” – in the Target settings
- Files like *.plist must have according Target membership settings – look at File Inspector “Target Mambership” section.
- Location of files must have “Relative to Project” but NOT something like “Absolute”. It’d be a problem when you share project code.
- ${EXECUTABLE_NAME} settings must be present in *.plist file. Other way app just doesn’t run and nobody knows why
- if on launch you see Running or Attaching and nothing is happening, it’s better to remove your user settings inside Project File. Do it carefully by right clicking on project file in Finder then press “Show Package Contents” and find your name inside “xcuserdata” directory. Remove yours subdirectory and run cleaned project again. If it’s helped then it means the EXECUTABLE_NAME settings wasn’t renamed while you copying Target and Xcode was waiting for wrong EXECUTABLE_NAME to be launch. Good if it works now.
I’d very recommend to go through the list if you have really strange or unclear problem.






