Search
Follow
Recent Comments
« AirMail Push Notifications | Main | Downloading iPhone app data with the organizer »
Wednesday
Mar172010

Multiple Xcode targets and info.plist

Another Xcode tip that I use a lot prompted by a question on StackOverflow.

When I have an Xcode iPhone OS project that requires multiple targets I like to create a directory for each target under the resources group. I can then place any target specific assets such as icons, data and the Info.plist file in one place. This helps a lot when it comes to selecting which items are included in which target build.

Note that the location of the Info.plist file needs to be set for each target in the build settings for the target (right-click on the target, get info and then look in the packaging section of the build tab).

A common and easy mistake to make when selecting which files are included with each target is to select the Info.plist file. This causes a build warning as follows:

Warning: The Copy Bundle Resources build phase contains this target’s Info.plist file ‘Resources/AppTarget1/Info.plist’

If you are building for a device the codesign operation will also fail:

Command /usr/bin/codesign failed with exit code 1

The solution is easy enough, just find the offending Info.plist file and uncheck its target setting. Apple has some more details on the problem in Technical Q&A QA1649.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>