Troubleshooting application archiving in Xcode
This technote answers common issues encountered while archiving iOS and Mac applications in Xcode. See Archive Your Application for more information about archiving applications in Xcode.
Why is the Archive menu item grayed out in Xcode ?
The Archive menu item may be grayed out in Xcode for one or more of the following reasons:
The Archive command is unchecked in the scheme editor Build pane of your scheme.
Check the Archive command in the scheme editor Build pane of your scheme to turn on archiving for your application as shown in Figure 1.
The run destination is set to "iPhone Simulator" in the Scheme pop-up menu in the upper-left corner of the Xcode toolbar.
Applications built for "iPhone Simulator" cannot be archived nor submitted for review. Set the run destination to "iOS Device" to enable archiving for your application.
Xcode successfully archived my application, but the Archives Organizer does not list my archive.
The Archives Organizer may not list your archive because you have probably set the "Skip Install" build setting to
YES in your application. "Skip Install" should be set to
YES in static libraries and
NO in applications as shown in Figure 2.
<Project name> does not contain a single–bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single–bundle application.
You may be getting this message for one or more of the following reasons:
Your archive contains header files.
Your archive contains header files because you have probably added these files in the Public group of the Copy Headers build phase of your Target. Drag your header files into the Project group of the Copy Headers build phase to resolve this issue. See Setting the Visibility of a Header File to learn more about public and project header files.
Your archive contains static libraries.
You should set "Skip Install" to
YESto prevent your static libraries from being added to your archive.
Unexpected Save Built Products and Export as Xcode Archive options in the Archives Organizer when attempting to distribute my archive.
The Archives Organizer shows Save Built Products and Export as Xcode Archive as shown in Figure 3 because your archive is not an iOS archive. Make sure that you have an iOS archive before attempting to distribute it.
Document Revision History
Added information on how to resolve the Archives Organizer's "Save Built Products" and "Export as Xcode Archive" issue.
New document that describes how to resolve common issues encountered while archiving iOS and Mac applications in Xcode.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-06-28)