Xcode 4 - "Archive" is greyed out?

XcodeXcode4

Xcode Problem Overview


I would like to archive my application, but the Archive option is greyed out. What could cause this?

enter image description here

Xcode Solutions


Solution 1 - Xcode

You have to select the device in the schemes menu in the top left where you used to select between simulator/device. It won’t let you archive a build for the simulator.

Or you may find that if the iOS device is already selected the archive box isn’t selected when you choose “Edit Schemes” => “Build”.

Solution 2 - Xcode

see the picture. but I have to type enough chars to post the picture.:)

enter image description here

Solution 3 - Xcode

As the other answers state, you need to select an active scheme to something that is not a simulator, i.e. a device that's connected to your mac.

If you have no device connected to the mac then selecting "Generic IOS Device" works also.

enter image description here

Image for newer versions of XCode:

enter image description here

Solution 4 - Xcode

I fixed this today...sort of. Although the archives still don't show up anywhere. But I got the Archive option back by going into Build Settings for the project and re-assigning my certs under "Code Signing Identity" for each build. They seemed to have gotten reset to something else when imported my 3.X project to 4.

I also used the instructions found here:

http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/DistApps/DistApps.html#//apple_ref/doc/uid/TP40010215-CH11-DontLinkElementID_69

But I still can't get the actual archives to show up in Organizer (even though the files exist)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNippysaurusView Question on Stackoverflow
Solution 1 - XcodejasonView Answer on Stackoverflow
Solution 2 - XcoderockXrockView Answer on Stackoverflow
Solution 3 - XcodeLee BrindleyView Answer on Stackoverflow
Solution 4 - XcodeRalph BView Answer on Stackoverflow