43

What is the difference between an IPA file and an .xcarchive?

Which one do I have to create to upload an app using Xcode's Application Loader?

mfaani
  • 33,269
  • 19
  • 164
  • 293
Tony
  • 10,088
  • 20
  • 85
  • 139

2 Answers2

53

Difference between IPA and .xcarchive:

IPA is a zipped up Payload folder which has YourApp.app bundle. .app contains all your application resources like images, plist files, compressed nibs and the executable, CodeSigning resources,etc.

xcarchive contains your app and dsym files. .DSYM is required to desymbolicate your crash logs. Right click on saved .xcarchive and select show package contents to see what it contains.

0x8badf00d
  • 6,391
  • 3
  • 35
  • 68
5

First comes .xcarchive, which can be used to create an .ipa and sent to App Store Connect.

TLDR: .xcarchive is intermediary step for you, and an .ipa can be used for uploads to the App Store.

.xcarchive:

  • xc is a hint that its for Xcode, not users. (e.g. other files for Xcode: .xcodeproj, .xcworkspace)

enter image description here

.ipa: iOS Packaged App

After generating your .xcarchive and you can find it in Windows > Organizer > Archives, you can click Distribute app > App Store Connect > Export , which creates this, which you would upload to App Store Connect:

enter image description here

To investigate whats in the .ipa, you can rename the .ipa file into a .zip and extract it. You'll find the following directory structure:

enter image description here

Ben Butterworth
  • 22,056
  • 10
  • 114
  • 167
  • Excellent answer. Thanks. Why is it a two step (xcarchive then ipa) process? You can't do anything with an xcarchive other than changing into an ipa file and getting to ASC or I'm wrong and the xcarchive has its own usage without converting to an ipa? or is that you can you create distinct ipas from a single xcarchive? – mfaani Jan 06 '23 at 15:48
  • Perhaps (not 100% sure) it is because you may have different ipas, based on options. See `xcodebuild -exportOptionsPlist`, described in https://encyclopediaofdaniel.com/blog/xcarchive-to-ipa/ and https://stackoverflow.com/a/34272714/7365866 – Ben Butterworth Jan 06 '23 at 16:06
  • Just found that docs point out to: [distribution options](https://help.apple.com/xcode/mac/current/#/devde46df08a) as things you can change. We do it using fasltane and our CI. So I don't get really exposed to it. – mfaani Jan 06 '23 at 16:50