5

I am trying to create an ipa file (Product->Archive->Share) but Xcode produces just archive file.

It worked well few days ago. I was always getting working ipa but now I can't make it to produce ipa (when I click on share in archive I can't sign the code). I have added subproject into main project within few past days (CorePlot-CocoaTouch). I am no one hundred sure it can relates.

Engeor
  • 328
  • 4
  • 14

6 Answers6

13

If you've added a static library, they get installed by default now. This is not okay for iPhone applications. Go to the project file and select the static library's target. Under Build Settings, go to the Deployment section and change the Skip Install setting to YES. Since Xcode 4, it is now NO by default, which will break your IPA (since the only binary you can install legally is the application binary itself).

You may have to switch from the Basic view to the All view to see this setting.

Jason Coco
  • 77,985
  • 20
  • 184
  • 180
  • Thank you for your answer. I have already did this (set all "skip installs" I found to yes) but with same result. It still offers me archive without chance to share it as ipa. – Engeor Jan 05 '12 at 08:34
  • 1
    @Engeor Then something else is still getting installed. Take a look inside the original archive that got created (or even the new one that it makes). The only thing in there should be your app bundle. Find out what else is getting in there and you will have a clue where to look next. – Jason Coco Jan 05 '12 at 08:37
  • The only difference between old archive that worked and new archive that isn't is folder with header files of CorePlot. Apart of this there is only one app file. I am lost :-( – Engeor Jan 05 '12 at 08:58
  • 3
    @Engeor That's the problem! Dont install the header files. Change them to project or private and you'll be set. – Jason Coco Jan 05 '12 at 09:04
  • Thank you. Meantime I have included coreplot as a static library, not the the project what solved the problem. But thank you very much for your help! – Engeor Jan 05 '12 at 09:33
8

Since the answer that worked for me is buried in the comments, I thought I'd bring it to the top. In my case, changing the header files for the static library to Project fixed the issue.

To do this, select your library target, then go to Build Phases > Copy Headers and move the header files from Public to Project.

Brian Rak
  • 4,912
  • 6
  • 34
  • 44
2

One who has tried all other answers and had no luck the please check this check box, hope it'll help (did the trick for me xcode 6.0.1)

enter image description here

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
0

In XCode 5 the same error occurs if you have multiple targets and wrong checkmarks in Manage Schemes. Then Xcode puts 2 binaries into 1 Generic Archive. This does not affect checked in files into e.g. git!

cat
  • 2,871
  • 1
  • 23
  • 28
0

The other answers are all probably right, but didn’t help in my case. I spent hours on this and finally rebooted. Then I once more got the application archive I had gotten a week ago.

David Dunham
  • 8,139
  • 3
  • 28
  • 41
0

If you include a project that produces a static library, try checking the option "copy only when installing". This stopped Xcode from including the static library inside my application archive. I used Xcode 6.3.2.