1

I have just taken over of a legacy project written in Objective-C and started extending it with some Swift elements.

The issue is that I cannot archive the app into an IPA - I constantly get generic Xcode archive instead of IPA that I can submit to the app store

enter image description here

Context : - Cocoa pods version 0.39.0, Xcode version 7.2

  • I use cocoapods but the issue was present earlier, when the project didn't use it yet.

  • I have tips from other similar issues on stack overflow (one two) but nothing seems to help.

  • 'Skip install' is set to YES on all of the pod building targets. Main project has 'skip install' set to NO.

  • When I export the build products the folder contains only MyApp.app

  • All of the copy headers are in 'Project' not in 'Public'. I have also tried a configuration with 'Private' but it didn't help.

enter image description here

  • My build scheme : enter image description here
  • I have also tried building the entire workspace from command line with the following script :

xcodebuild -scheme MyScheme -workspace MyProject.xcworkspace clean archive -archivePath build/MyProject xcodebuild -exportArchive -exportFormat ipa -archivePath "build/MyProject.xcarchive" -exportPath "build/MyProject.ipa" -exportProvisioningProfile "DistributionProvisioningProfile"

but I'm getting the following error :

error: the archive at path '/pathtotheappfolder/MyProject.xcarchive' is not a single-bundle archive

My main question is - how build it as an IPA?

Side question - how do I find out or at least get direction of what is going wrong?

Update :

When exporting the archive and going to "show package contents" the file structure looks like that :

enter image description here

Thanks!

Community
  • 1
  • 1
Paweł
  • 1,201
  • 1
  • 14
  • 27

6 Answers6

1

For quick result, go to Organizer , right click on archive file and select show in finder. you will get xcarchive, now right click and select show package contents. go to products, go to application, there will be app file.

Now copy that app file and paste it in new folder with name payload. then compress it. then rename it with project_name.ipa

You will get ipa quickly.

Hasya
  • 9,792
  • 4
  • 31
  • 46
  • Thanks for you reply! Unfortunately the .app file from the package contents in 0 bytes... do you know what might be the issue? – Paweł Apr 14 '16 at 15:23
  • 1
    This solved my issue. This is an old way of creating an IPA file. I suddenly remember this approach which is way back around 2009. Thank you. – Zaldy Bughaw Jul 20 '16 at 13:54
1

Just follow below steps and you can have your issu resolved :

  • In your xcode go to Targets > Build Phases > Target dependencies > Remove it.
  • Now again build your api.
  • It will work for you. Its worked for me.
Kalpesh Panchasara
  • 1,730
  • 2
  • 15
  • 27
1

It happens, when you've added a new framework(s) for which you need to edit the Target > Build Settings and set the Skip Install setting to Yes.

Mr.Kushwaha
  • 491
  • 5
  • 14
0

For me it was because my scheme (Edit Scheme) 'archive' build configuration drop down entry was set to 'debug' and not to 'release' - due to a test that I did and forgot that this setting was set.

Thanks John Goodstadt XCode 12.1 Oct 2020

Dharman
  • 30,962
  • 25
  • 85
  • 135
John Goodstadt
  • 678
  • 8
  • 13
-2

Sadly, the only way out of this was to create a new project and move all the files over.

Paweł
  • 1,201
  • 1
  • 14
  • 27
-2

While viewing the Xcode archive (or xcarchive) in Xcode (8.3.2) click Export on the right hand side. Choose your certificate and a method for export. Then you'll get the ipa.

enter image description here

enter image description here

enter image description here

E_net4
  • 27,810
  • 13
  • 101
  • 139
Guney Ozsan
  • 300
  • 3
  • 7