xcode project archive option not available code example
Example: xcode project archive option not available
You've changed your scheme destination to a simulator instead of Generic iOS Device.
That's why it is greyed out.
or close all simulator then try