7

Is it possible to re-open an .xcarchive file on Xcode?

I know this is not common, but I would like to open a project exactly as it was submitted to the App Store. I don't have back up of that exact build, so it would be really great to open the archive copy!

Before you ask why don't I just download it from the store, I must say this build has been approved and is just pending on my release. :)

Thanks!

tomDev
  • 5,620
  • 5
  • 29
  • 39

2 Answers2

18

A xcarchive is a folder containing a (compiled) app bundle, a dSYM (debug file) for the app, and an Info.plist containing metadata about the archive (such as the name of the app and the date the archive was created). You can look inside a `xcarchive by control-clicking or right-clicking it in the Finder and choosing “Show Package Contents”.

The archive does not contain your app's source code (unless you have made a serious mistake in your project configuration).

You should use a version tracking system like git to store your source code. When you create an xcarchive for distribution, you should tag the current version of the source code in your build system, so that you can easily extract the source code used to build that archive.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • Thanks, you're absolutely right. Inside the archive is the .app file, and inside is the app, not the source code. Thanks for the explanation. What I wanted was to test one thing on the app, so I transformed the archive in an .ipa file (Organizer -> Distribute -> Save for Enterprize). I got the .ipa file, but so far I was unable to install on any device. iTunes says the "signer is not valid". – tomDev Feb 19 '13 at 04:12
  • I don't know anything about enterprise distribution. If you have the target device's UUID, you can add it to your developer profile (in the developer portal web site), sync your profile in the Xcode Organizer, and then build an IPA for ad-hoc distribution. – rob mayoff Feb 19 '13 at 04:16
  • 1
    ... or make an IPA for ad-hoc distribution from an existing archive. – rob mayoff Feb 19 '13 at 04:16
  • Thats what I did. I exported as Ad Hoc, but when I try to install on my device it says "the entitlements are not valid". I have an ad hoc provisioning profile. I guess when you create the archive I must select to build to ad hoc distribution. Now I think there is no way to open or run the app from the .xarchive. I guess I will have to release the app at the store and find out if it is buggy or not, or delete the binary and submit again. – tomDev Feb 19 '13 at 05:13
2

You can see contents of ProjectName [Date Time].xcarchive by right click on it and select Show Package Content.

It comprises of three things :

  1. dSYMs : dSYM files store the debug symbols for your app.

  2. Info.plist : property list containing details such as ApplicationProperties, ArchiveVersion, CreationDate, Name, Scheme.

  3. Products : This contains App file for your project.

Step 1

Step 2

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177