Archive button grayed out in Xcode
Asked Answered
R

1

210

Would you be able to help me understand the reason why Archive button is grayed out in Xcode?

screenshot

I have all developers profiles downloaded

screenshot

Device type set to iPhone 6

https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMAWVMrKmltX1ywKmMva3/fMkmN.png

And archive is checked in scheme.

https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMAWVMrKmltX1ywKmMva3/66pRt.png

Radarman answered 22/4, 2016 at 16:38 Comment(2)
Put Generic iOS Device instead of selecting a Simulator.Galbanum
Thank you ! For some reason I thought device is needed. It works nowRadarman
C
543

Answer valid through Xcode 7, 8, 9, 10, 11 and 12+


You can not archive, because from target you have not selected device or Generic iOS device or Any iOS Device , still there is a simulator.

Nothing generic or wrong with Xcode 7. This happens with all Xcode versions.


  • Problem - Why archived button is grayed out?

enter image description here


  • Solution - Why archived button is not grayed out?

enter image description here

In Xcode 12 it is named Any iOS Device

Xcode 12

Contradistinguish answered 22/4, 2016 at 16:44 Comment(14)
Good luck. @atxContradistinguish
I wish Xcode would leave the Archive option enabled, but give a useful message like "you must select generic...blah blah". Or anything that would tell you why it won't actually do the archive. I'm not a fan of disabled options, especially when the end result is a lot of searching for the same issue by many people (such as is the case here). I had encountered this issue before and had to search again because I forgot why it was an issue before, lolYacov
@VariousArtist True, hope such additions comes in next XCode versions.Contradistinguish
Still valid in XCode 9.2. 👏Holloway
Yeah, I guess Mac app development can’t change menu options run time, but it can enable / disable option.Contradistinguish
Worked like charmVelarize
Seems like generic.Contradistinguish
I feel so dumb by looking at this. Anyone else? thanks a lot by the way.Lifeless
@Lifeless me tooSlapup
The option is now called Any iOS Device (arm64)Pick
Still valid in XCode 12.4Contradistinguish
I don't think Apple is hostile towards developers, I just think they're suffering the consequences of making iOS and macOS a gated ecosystem. XCode is a mess, no doubt about that.Vilma
@Contradistinguish Thank you for adding the screenshots. That's what has not been obvious for me in related questions on this matter.Duckworth
Thank you for the answer. Completely obvious, but I was still stumped until I read your answer, when it BECAME obvious! Saved me pulling my hair out, again. Xcode - fun every day! :-)Platitudinize

© 2022 - 2024 — McMap. All rights reserved.