Xcode 4 + iOS 4.3: "No Packager exists for the type of archive"
Asked Answered
U

7

76

I just upgraded to Xcode 4 and am trying to create an adhoc build of an earlier project. Whenever I use the "Archive" option I either end up with no archive at all in the Organizer window OR there is an archive, but there is no option to package it as an .ipa, because "No Packager exists for the type of archive".

Has anyone gotten adhoc builds working under Xcode 4 for project that have been migrated from Xcode 3.2?

Unrighteous answered 11/3, 2011 at 10:4 Comment(6)
similar question but also no answer :-( https://mcmap.net/q/24066/-xcode-4-create-ipa-file-instead-of-xcarchive/509535Magically
try clean build and check files permissions in Mac Disk Utility firstEolith
anyone know how to create & add such a packager?Oesophagus
I had no problems moving a project. I have a backup of the old project. I will check with this and let you know. Edit: My old project was being read as a OS-X project. I had to edit the project file and change the build target. This fixed my issue. I doubt this is the problem in your case.Bleacher
Edit your scheme. What do you have as the Build Configuration for the Archive action? (Project -> Edit Scheme -> Archive)Bleacher
Here is full instructions on how add static libraries to project. Maybe it helps. docs.google.com/document/…Hyoscyamine
G
134

you may have some linked projects (like librairies) inside your main project. Go to the Build settings of those projects and set the setting "Skip install" (Deployement category) to "Yes", but leave the "Skip install" of the main project to "No". Build, archive, and you should be able to select the ipa package.

Gironde answered 16/3, 2011 at 8:36 Comment(6)
In my case I had also include header copied from subproject to my source code. And then it worked.Singletree
+1 Can't imagine how many hours I would have lost if you hadn't posted this answer.Salinas
+1 saved me, thanks! Important that people understand this must be done on the static library itself, not your app target. That got me for a bit.Quorum
OK, just to save other people's time digging through this post. According to Josh Brown (in one of the answers down below), only changing 'Skip Install' won't work IF you have another whole project inside your main project (that is, not only .a files). An extra step you have to do in that additional project is... "In that project, go to the Build Phases, and in the Copy Headers section, move all headers from the Public and Private sections to the Project section." - In the original answer he also mentioned browsing inside the content of the .xcarchive file to see what needs to be movedVibrant
Haha, funny, this guy have posed just one question - this one - on SO but what a question! He have more rep than most of us! However, thank you, guy :)Phonography
Thanks very much, could anybody let me know the source for this solution. Is there any apple document saying this kind of adjust ments?Oversize
A
25

Thanks but I needed 3 steps to entierly solve the problem with my project framework:

  1. set the Target Build Settings/"Skip Installation" property to "YES" for every dependency project

  2. clear the Target Build Settings "Installation Directory" property for every projects

  3. for every projects, move every headers from section "Build Phases/Build Settings/Copy Headers" Public/Private to Project

Akimbo answered 19/5, 2011 at 13:35 Comment(4)
I wish I could upvote you ten times. #3 took care of the problem for me.Bade
Great, that helpes me after adding two steps: clean and reopen XCode. Thanks!Minority
Joining the thanks, and also telling people not to change the Installation Directory of the top project (should be $(LOCAL_APPS_DIR)) - The archive wouldn't show up at allColewort
Thank you very much. This private/public to project thing worked for me.Circumscription
D
9

I found that a combination of these answers solved the problem. I spent a lot of time verifying whether Skip Install was set to Yes on all linked projects and it turned out that was only part of the issue for me. If you're experiencing this issue with Archive, here are the steps to take:

  1. Find the archive in the Organizer, right-click and select Show in Finder.
  2. Right-click the .xcarchive file in Finder and select Show Package Contents.
  3. Find the Products folder and see what's in it. There should only be an Applications folder in the Products folder, and the Applications folder should contain only one iPhone app (YourProject.app).

If, in step 3, you find a static library (<some-library>.a) either directly under Products or in a subfolder, go to Xcode and select the project that produced the static library (you should be able to tell which project it is based on the name of the static library). Go to the Build Settings and select the target, then set "Skip Install" to "Yes".

If, in step 3, you find header files (<some-header>.h) either directly under Products or in a subfolder, go to Xcode and select the project that contains those headers. You should be able to find the project based on the prefix used in the header file names. In that project, go to the Build Phases, and in the Copy Headers section, move all headers from the Public and Private sections to the Project section.

Thanks to this answer and this answer and this answer for helping me to resolve this.

Deeplaid answered 28/12, 2011 at 21:39 Comment(1)
"In that project, go to the Build Phases, and in the Copy Headers section, move all headers from the Public and Private sections to the Project section." <-- this works! Thanks!Vibrant
F
5

Here's two other tips that we found useful with this problem...not answers but they may save someone else a LOT of time messing around 8/

If you're using static libs that are NOT being built by xcode4 then the "deployment->skip install" workaround won't work for them. The work around for that is to NOT add them to the project and make sure their paths are in the Header and/or Library Search Paths in your Build Settings plus the -lblah entries are added to the Linker Flags.

Also, if you have a static lib set as a Target Dependency (e.g. we had libjson.a set as this and I'm pretty sure that's the correct/logical thing to do) then you simply won't be able to build .ipa's no matter what. We spent more than a full day dancing around with this stupid problem and in the end just removing this solved it. Personally I think this should really leave a broken project...but it works so meh.

Fruitarian answered 29/3, 2011 at 8:25 Comment(1)
Thanks, this also worked for me. "Skip install" was having no effect, and finally removing the lib's project/target dependency from my project's target was the solution (and instead I simply added the ".a" file to the project's linked libraries, + kept linking to the header files)Garrity
A
3

In order to figure out what project/library/component that is preventing Xcode from making a proper archive do this:

Find the archive in the Organizer, right-click and show in finder. This will show an .xcarchive file. Right-click and Show Package Contents. Now look in the Products folder. Most likely there will be more than just an Application folder with one iPhone application inside.

In my case there was a usr/local/lib folder structure containing libOAuthConsumer_iPhone.a and when I searched for that in Xcode, I did indeed find another project where I haden't set Skip Install to YES. It may not be so easy for everyone but looking inside the package should at least give you a pointer as to which component is messing up the archive process.

Adan answered 6/12, 2011 at 8:3 Comment(0)
B
1

Skip install didn't work for me. I solved this problem moving all headers marked as public to project. I'm currently working in a workspace with a static lib and an ipad proj. Seems like there is a bug or something with xcode whenever you want to build your product with a linked project, xcode builds both and Organizer doesn't show an option to share an ipa.

Brakesman answered 24/11, 2011 at 19:18 Comment(0)
L
1

These are steps to solve above problem in xcode 4.2

1: " Skip to install" to YES for all third part libraries which are added. "Skip to install" to NO for your project.You can access "Skip to install" from Build settings.

2:Select your third party library headers from left Navigator pane.

2.1:On the right is Utililtes pane.Show and hide it with view ->utilities->show/hide utilities (command-Option-0) or with third button in the view segmented control in the toolbar

2.2: select file inspector(command-option-1)

2.3 choose Target membership and change option to 'Project' from public or private

Leak answered 13/4, 2013 at 7:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.