Thursday, December 20, 2012

Having problem on creating .ipa file from Xcode's "Product -> Archive" or "Build & Archive" method ?

                 Creating an IPA is done in a simple way from your Xcode : Product -> Archive (previously Build & Archive). After the Archive operation completes, go to the Organizer, select your archive, select Share and in the "Select the content and options for sharing:" pane set Contents to "iOS App Store Package (.ipa) and Identity to iPhone Distribution (which should match your ad hoc/app store provisioning profile for the project).
It's a simple stuff to do but BANggggg... You might be in trouble if you have been using some other static library, third party library, other xcode project files in your project. You might have following issue that disables your .ipa file selection :
 “No Packager exists for the type of archive and This kind of archive cannot be signed."


The reason :

          It happens when your build produces more than a single target: say, an app and a library. All of them end up in the build products folder and Xcode gets naïvely confused about how to package them both into an .ipa file, so it merely disables the option.

The Solution :

         Go to each of your external projects/library's Target and select "Build Settings" tab, except your main application target, and set Skip Install flag to YES (search for Skip Install in your Target Build Settings). Then do the Product -> Archive once again and go to the Organizer to select your new archive. Now, when clicking on the Share button, the .ipa option should be enabled. Note: set Skip Install to YES for only those static library and projects you included in your main project, but it should be NO for your main project and Skip Install setting of others should be on their Target's Build Setting.

Just setting Skip Install to YES did not work for you??? Arghh.....then you have to do one more step(remember Skip Install should be YES though):

-> Go to each of your external projects/library's Target and select "Build Phases" tab, then open Copy Headers section, there you will have some of headers in Public, some in Private and some in Project. Move ALL of headers(.h files) to Project section. Now, Try Archiving, it will and should work....
HAPPY CODING !!!

No comments:

Post a Comment