how to archive xcode code example
Example 1: can't archive xcode
Archive Menu Option Grayed Out
If you can't create an archive in Xcode, usually it's because
you have the destination set to the simulator.
Example 2: xcode archive window
Open the Organizer window in Xcode (menu Window > Organizer)
Click on the Archives icon in the top middle
Select the desired archive by app name and date
Click Show in Finder in the context menu