Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Product -> Archive disabled

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 went through the provisioning setup for the project and it looks ok.

My Ad Hoc profile is about to expire in 14 days. Could this be the problem? I don't believe I can renew it until the day it expires. There is a a "renew" button for my ad hoc profile in the organizer but when I click it I get...

The given profile was not found on the provisioning portal. Please refresh your provisioning profiles before attempting to renew “MyAddHocProfile”

The profile in the provisioning portal shows active, expiring on the 30th. I noticed that I had not yet upgraded to 4.6.2 and did so. Then I downloaded my profile and double cliked it thinking that would refresh the profile in Xcode, still no joy. I also tried manually replacing the profile file MyAddHocProfile.mobileprovision in the Library.

What do they mean "refresh your provisioning profile"?

Even so, I would think that as long as the profile is active, I should be able to create an archive. I must be doing something else wrong.

like image 234
user278859 Avatar asked Apr 17 '13 02:04

user278859


People also ask

Why is archive greyed out Xcode?

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.

How do I archive in Xcode?

Archive your App In Xcode with your project open, select the simulator (button near the top of the window next to your project name, typically named as a specific type of iPhone) – change it to Generic iOS Device. Open the Product menu and choose Archive. You will see the archive information. Click Validate App.


2 Answers

You've changed your scheme destination to a simulator instead of Generic iOS Device.

That's why it is greyed out.

Change from a simulator to Generic iOS Device

like image 178
wiseindy Avatar answered Sep 19 '22 18:09

wiseindy


Select "Any iOS Device" in newer versions of Xcode. And Archive Option will be enabled!

like image 22
C Baraliya Avatar answered Sep 22 '22 18:09

C Baraliya