Search code examples
iphoneiosxcodexcode4mailcore

Creating an IPA, "contains multiple products"


I am working on an email client based on ReMail. Basically, I reused the ReMail project so that the MailCore etc dependencies would be all set up out of the box so I could build a new app on top of them. I'm trying to give the app to some beta testers via ad hoc, but when I try to create an IPA, I receive this error:

xxxx 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.

I have set Skip Install to YES for all dependencies, and moved all files under Copy Header to the "project" section, but I am still unable to build a single APP file.

I don't know if this is significant, but when I open up the xcarchive file, within the products directory, I find a the APP file under Applications, and then a file structure mirroring the absolute path to the header files for MailCore.

Any ideas as to what might be going on? I'm very near the tearing-out-chunks-of-hair-in-frustration stage, and I don't think the unnaturally bald crazy person look would suit me.

Thanks!


Solution

  • Try removing the “Copy Headers” phase entirely. It's only supposed to be used for frameworks, not static libraries. The Xcode static library template that includes a “Copy Headers” phase is wrong.

    Check out the “Working with Schemes and Projects in Xcode” video from WWDC 2012, starting at 45m10s.