Archiving my project in Xcode is creating a multi-application bundle, instead of bundling my main target for release, which is what I want. Specifically, when I validate my archive in Organizer, it gives me the message:
"[projectname] 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."
It sounds like there is some setting in the scheme that needs to be adjusted, but I can't figure out what's causing other targets to be included.
I'm using Xcode 4.0 by the way.
i also had this same problem "[projectname] 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." after upgrading to xcode5.
the problem was that a bunch of fields in my build settings for 'release' were blank. I guess xcode4 automatically switched to the debug setting.
anwyays - my fix was to find all those 'release' settings that were blank and set them to the debug setting. In particular it was the Info.plist file setting.
Two things needed to be fixed in the sub-project(s) to resolve this issue:
OK, answering my own question. Turns out it is an issue with dependent projects in XCode 4. If this happens to you, go through the Build Settings for all your dependent projects (e.g. static libraries) and make sure that the "Skip Install" option under "Deployment" is set to YES.
More detail here: http://flakasoft.com/developer-tips/xcode-4-bug-solution-for-archiving-build-with-static-library/
I did the following to make it work for me:
Absolute path
toproducts directory
.and that was it!
hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:
usr/local/include
will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory. but that directory (ie usr/local/include) varies depending on your sublibrary directory structureI had a copy files build phase I forgot about (copied some fonts into ~/Library/Fonts). After removing this build phase, it worked fine.
If none of the above answers fix the issue, I recommend exporting the archive to the finder and taking a look what's outside the .app bundle.
Edit: see https://github.com/RestKit/RestKit/wiki/Xcode-4-Archiving-Issue:--'Does-not-contain-a-single-bundle'