33

When I "Build for archive" in Xcode 4, where does the file go? As in, where on my computer is the archived app saved?

Thanks

Darren Findlay
  • 2,533
  • 2
  • 29
  • 46

2 Answers2

40

It depends on your build location goes (see Xcode > Preferences ... > Locations).

Note that "Build for Archive" doesn't archive your work in the "Archive Location" you enter there ... it just builds it as if it was being archived (so with the same pre/post-scripts being run, the right Configuration, and in your normal building location). To actually archive your work, you need to select plain old "Archive" instead of "Build for Archive".

Hope this helps.

pho0
  • 1,751
  • 16
  • 24
  • Is this preference stored in a plist somewhere? I'm trying to write a script that would need to check for the location. – atreat Feb 06 '15 at 16:33
  • @nschum is right, but just be aware of there is no IPA file in archive :) – lu_ko Mar 04 '15 at 16:57
  • You can export archives as IPAs, though: `xcrun xcodebuild -exportArchive -exportFormat ipa -archivePath XXX.xcarchive -exportPath "XXX.ipa" -exportProvisioningProfile "XXX"` (or through the Xcode Organizer GUI). – nschum Mar 04 '15 at 21:15
5

For fast direct access to an individual archive, in Xcode's Organizer window, go to the Archives tab, right-click an archive, then "Show in Finder".

Graham Perks
  • 23,007
  • 8
  • 61
  • 83