Why is the Archive menu item grayed out in Xcode ? The Archive menu item may be grayed out in Xcode for any of the following reasons: The Archive action is disabled for your app in the scheme editor's Build pane.
Delete the files from the xcode project navigator (only deleting references). Add them again to the project (dragging from finder into the project navigator).
EDIT (Incorporated all comments to a single answer)
Try one of the following (or all)
Instead of using Build For -> Archive, in the product menu just use archive. It will show up then.
In the scheme editor, edit the scheme and go to the Archive tab, make sure the check box for show in Organizer is checked.
In the archive tab in the scheme editor check the build configuration used for archiving. Make sure it has the right entitlements file & certificates.
In the build settings switch Skip Install -> Release to NO, for the build settings used for archiving.
Make sure the archives folder and XCode project files are inside the same shared folder if network drive is used. I took me a few days to finally figure this out as I placed my XCode source files from a Windows shared folder, but the Archives folder is on the local Mac, which caused archives not picked up by Organizer.
Thanks to @Smikey & @Ralph B & @Scott McMillin
This is based on another answer from a similar question which can be found at Archive does not appear in xcode4 organizer
I take no credit for this answer, but this together with the suggestions from Ron fixed the problem for me.
For the "Release" configuration do the following:
Set "Skip Install" to YES on your project
Set "Skip Install" to NO on your application target
Set "Skip Install" to YES on all static library targets that are included
Choose Product -> Archive from the menu.
This also worked for me, and according to the original answer poster, is based on advice from the Apple Dev Forums.
I had the same problem... I had mistakenly set "Installation Directory" (INSTALL_PATH
) to an empty string in my Build Settings. Removing this setting and using the default /Applications
solved my issue.
One more thing to check: Search for the "Installation Directory" in your Build Settings (All) and make sure it's set to "/Applications".
Yes! Finally. I too was stuck on this for 2 days! I should have checked here first!
Skip Install ... moved it to NO and it worked!
I had a similar issue where the distribution compiled and signed fine, but never showed up in the Archive tab. Turns out I needed to attach a device to get it to build a "real" iOS build. Once I attached my device, I ran Product -> Archive and it showed up as expected.
None of the suggestions here worked for me, including setting "Skip Install" to NO... until I set "Installation Directory" to something other than the blank default value. (I used "/Applications" but other values like "/usr/bin" would be fine too.) Then lo and behold, it worked!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With