I have been archiving for ad hoc distribution fine for many months and suddenly today I cannot do so as the Archive menu item is disabled. I have not changed anything. I wen
Change the active scheme Device from Simulator to Generic iOS Device
If you are sure that you selected the Generic iOS device
and still can't see the option, then you simply have to restart Xcode.
This was the missing solution for me as a cordova developer with Xcode 11.2
You've changed your scheme destination to a simulator instead of Generic iOS Device.
That's why it is greyed out.
Select active scheme to Generic iOs Device.