“xxx does not contain a single–bundle application or contains multiple products” archive error in Xcode 4 project
Question: I am trying to build an iPhone application for distribution on iTunes app store. I figured out how to build a Release version (ie. Archive) but “xxxxx does not contain a single–bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single–bundle application.” error pops up during Validation. Project environment: Xcode 4 project, Mac Book Pro, OS X 10.6.6. Project builds with no error and proper provisioning file is used. Two custom static libraries are built with no errors and linked perfectly.
Answer: Xcode 4 rebuilds your static libraries and probably deploys them as multiple products into the bundle.
1. Open the static library project. Scroll down to the Deployment group in the Build Settings.

Select dependent project(s) in the Project Navigator
2. Find “Skip Install” and set to YES.

Dependent project's settings in Xcode 4
3. If you have more dependent project, repeat these steps for all of them (i.e. at static library projects).
Notes:
- The app is expected to be deployed so do not change the Skip Install’s No to YES there. Change at the dependent projects only.
Links:
How to build and submit iPhone app to AppStore with Xcode 4
Comments
Log in to post (or reply to) a comment. You can use your Twitter account.
This blog was originally designed for our own project partners and freelance programmers to share questions and solutions in this online private pub. From April 1, 2011 we open the blog for all of you to add comments or ask a question in a new post. All comments and posts are moderated before they are posted to verify the quality of content on our pages. Comments are usually posted within 15 minutes. Posts may be re-edited. You can post source codes in comments using [code][/code] tag.



judith
11/04/08 16:15
Will you publish a guide on how to build a static library with Xcode 4? Any changes to Xcode 3.2.5 ?
MoSR
11/04/06 07:03
The above ‘hack’ works, but I don’t like it… it seems that to comply with the Submission Validation you need to subvert the whole purpose of Copy Headers.
MoSR
11/04/06 06:51
Hi – this was very useful – thanks for doing the due diligence!
After moving the Copy Headers into the Project grouping, they no longer get auto-copied to each release/platform build folder (Debug-iphoneos/Debug-iphonesimulator), and the product build fails.
I suspect I now need to specify in the Search Headers entry (in the product build settings) the path to the source headers in the dependent project, rather than those that used to be auto-copied.
Is this correct or have I missed something?