Xcode won't start, stuck on 'Verifying "Xcode"...'
Asked Answered
J

16

141

I've installed Xcode on a mac and when I try to start it I get a little window open saying 'Verifying Xcode' with a status bar scrolling across, anyone got a fix rather than reinstalling?

Judoka answered 23/9, 2014 at 13:31 Comment(6)
What version of OSX?Candidacandidacy
Is this the release version (6.0.1) or a beta ?Chumash
Didn't have this problem last week w/working XCode 6.0.1 GM, but suddenly this morning it refused to start; said XCode was damaged & should be thrown in the trash. Re-installed 6.0.1 w/same issue. Downloaded/installed latest version (6.1_gm_seed_2) and it worked eventually but took forever to "verify" & ask for my password. Wondering if it's an issue w/using an outdated version & not installing via App Store? Worked great last week & only died after 6.1 became available...Mckenzie
Could you please accept one of the very good answers you've gotten and dole out very well-deserved rep?Mielke
I waited for 20mins and started up without any issueBrownnose
I believe an accepted answer is long overdueFort
K
285

If you don't want to wait forever, this might help:

xattr -d com.apple.quarantine '/Applications/Xcode.app'
Kumar answered 21/10, 2014 at 0:15 Comment(14)
make sure Xcode.app is at the same directory where the command is run. It also requires admin privileges or use sudoBenares
it worked like xattr -d com.apple.quarantine /Applications/Xcode.app ThanksCoccyx
THANKYOU! This is super helpful in a pinch when you need an app RIGHT NOW (Like if you go to a WWDC session that you need Xcode 7 for and you... uh... forgot to download it)Venerable
Great answer! Do not run this code willy-nilly though, see my answer for why and for more detailed instructions below.Clarence
This is a STUNNINGLY bad idea. Yes, the verification takes a few minutes, but as the television news will tell you today, as I write, someone has put together a subverted Xcode package that installs unwanted additional code into iOS apps. Just let Mac OS X validate it.Intertype
@alastair If I downloaded Xcode from Apple's site, whose identity is verified with HTTPS, I don't see where there's a security hole if I skip verification.Creaky
Xcode 8 takes forever for macOS to verify. Thanks for this, now I can make stickers!Kirbie
It is giving an error: Xcode.app: No such xattr: com.apple.quarantineMaximilien
I am also having the same error: No such xattr: com.apple.quarantinePoeticize
xattr: Xcode.app: No such xattr: com.apple.quarantineBrownell
@Mobihunterz You should write full path to downloaded file, like this: "xattr -d com.apple.quarantine /Users/MYUSERNAME/downloads/xcode.app"Ree
Thanks @Iban. However, I forgot why I posted this :(Poeticize
I just ran into the same issue for Xcode beta, so just to confirm this will also work with beta versions of Xcode, e.g.: xattr -d com.apple.quarantine Xcode_9_beta_3.xipCompositor
Worked like a charm. Shame on Apple for their flawed "verifying" crap.Ummersen
C
132

Running a command to get through Gatekeeper sounds like the way to go, since you downloaded it from a trusted source. This is a common occurrence when installing large bundles in Mac OS X. Basically, Gatekeeper examines your entire bundle, making sure that there is no suspicious code. This is one of the many things that keeps Mac OS X as secure as it is. You have two options:

1: Give it time.

Or,

2: Manually tell Gatekeeper "It's okay, this is from a trusted source". How do we do this? Well, first fire up the Terminal and navigate to your Xcode.app folder. (Or type in cd and drag-and-drop Xcode from your applications folder), then hit enter. Next, run the command:

xattr -d com.apple.quarantine Xcode.app

Now, be careful getting past Gatekeeper if whatever you are installing is even slightly from an untrusted source, or else you introduce a security risk to your computer. In my case, opening new versions of Xcode quickly is the only time I will ever run that command.

Clarence answered 17/6, 2015 at 20:56 Comment(5)
This worked. Thanks for the explanation as to why it works and the Gatekeeper background info.Eaves
This answer is so much more helpful than the accepted one because of your explanation.Stodgy
This is the only answer which answers how and why. Others just care about how. Thanks for such a nice and easy to understand answer.Unrest
+1 for this line , "How do we do this? Well, first fire up the Terminal and navigate to your Xcode.app folder. (Or type in cd and drag-and-drop Xcode from your applications folder), then hit enter. " :)Godhead
I was just trying to install qt-opensource for mac - t's 3.5GB and it was hanging and this fixed it on 10.11.6Prettify
F
30

anyone got a fix rather than me reinstalling?

For anyone else seeing a very long "Verifying Xcode" phase, just give it time. The indeterminate progress bar stays up there for a long time (tens of minutes) while Gatekeeper looks at the (very large) Xcode bundle to make sure that it's legit. Eventually, you'll get the familiar message along the lines of "This application was downloaded from the Internet. Do you want to continue?" Or, if the bundle doesn't check out, you'll of course get a message to that effect.

Felicefelicia answered 30/9, 2014 at 21:10 Comment(2)
This is the answer I need. It took around 20 minutes to finish.Probate
You really do have to be patient. Mine took at least 20 minutes past when the status bar hit the end, and the countdown finished. I finally got the "...downloaded from the Internet..." dialogue box, and clicked the "Open" button. That took another 10+ minutes before being prompted with licensing, etc. Now I'm trying to add "Command Line Tools". I'm hoping that being patient with that pays off as well. Currently, that just says "Installing components", with the status bar already at the end, and looking unresponsive like the others did.Volt
C
26

Almost every answer here recommends running xattr -d on the file. This deletes the file's extended attributes (like com.apple.quarantine) so OSX will not run the verification phase. You should only do this as an absolute last resort if at all. Apple explicitly recommends leaving Gatekeeper enabled to validate your version of Xcode after XcodeGhost malware was spread to popular iOS apps via infected versions of Xcode.

If you're stuck trying unarchive an Xcode beta .xip archive, try this:

  1. Open the Archive Utility app. (Open Finder by hitting ⌘+spacebar and type "Archive Utility")
  2. Choose File->Expand Archive and select the Xcode archive.
Counterproof answered 23/6, 2016 at 20:11 Comment(2)
It shows an 'Expanding Xcode_8_beta_2.xip' and states 'Verifying digital signature' and thereafter prompts an alert 'The operation couldn't be completed'Premature
I was stuck trying to unarchive an Xcode beta xip and a restart fixed it. After that I waited ~20 min for Xcode to verify.Lello
P
20

I had same issue. Quick fix is to open terminal from application or type terminal in spotlight and enter below command.

cd /Applications - This will move to applications directory where Xcode is present

xattr -d com.apple.quarantine Xcode.app - This will bypass Gatekeeper in OS X and will launch Xcode quickly

Note: If you have changed name of Xcode (say Xcode7-1) then you should enter ... Xcode7-1.app command. Refer screenshot

Screenshot for command

Premature answered 29/10, 2015 at 6:25 Comment(3)
This worked for me...open terminal through spotlight which will be in /Users directory and then follow the steps given aboveKloof
Works for XCODE 7.3.1Timmy
This worked for me with OSX 10.11.8 and Xcode_8.2.xip . First in Downloads I opened Xcode_8.2.xip which produced Xcode.app in Downloads. Then I moved Xcode.app to /Applications . Then, as suggested by Dubey, I executed xattr -d com.apple.quarantine Xcode.app without sudo. Then in Finder I opened Xcode without getting the verifying message.Flutterboard
U
16

open terminal -

1.Type cd drag drop your xcode (for path) then enter

2.next xattr -d com.apple.quarantine Xcode.app enter

agree for terms and condition

Ungley answered 13/10, 2015 at 6:18 Comment(2)
when drag drop and press enter i get Permission denied messageKirchhoff
nivritgupta add sudo before the command: sudo xattr -d com.apple.quarantine /Path/To/Xcode.app Then type in your password (it will not show typing in terminal)Swank
M
15

For Xcode 8: To skip the verifying process on El Capitan for Xcode 8, download Xcode 8 at the developer downloads page, then open terminal.

Following this, type

xattr -d com.apple.quarantine

Then drag your xcode 8 download into your terminal window. It should look like this:

Xcode 8 installation image

Matti answered 15/6, 2016 at 20:57 Comment(2)
Thank you. I let the verifying process run for a few hours, but finally looked up this answer b/c it was taking a ridiculous amount of time.Ferrara
I left it running overnight but it didn't fill in any of the progress bar. Then I rebooted and it worked basically instantly.Mirage
A
8

A lot of talk here about exempting Xcode-beta.app from Gatekeeper, but for me, I had to make the .xip file exempt.

I placed Xcode_8_beta_6.xip into /Applications, then in Terminal, changed directory to /Applications and ran:

xattr -d com.apple.quarantine Xcode_8_beta_6.xip

Then double clicked the .xip to get it to unpack.

Antipyrine answered 19/8, 2016 at 18:47 Comment(1)
Thank you so freaking much. I had no idea how to do this because there wasn't anything with beta 6 so I wasn't really sure what to type or do before that!Maximilien
J
6

running xattr -d com.apple.quarantine Xcode.app worked like a charm. Waiting on the "verifying xcode" didn't work, as it never completed.

Jocose answered 27/1, 2016 at 17:59 Comment(2)
Please format your code using four spaces before it or surrounding it with backticks. Thanks!Perlman
Finally the answer I was looking for. This works for everything, not just Xcode. I routinely get stuck with things that absolutely never finish being verified, so I have to use this.Creaky
A
5

Also you can remove Open Warning for entire directory Applications via the command in the terminal:

xattr -d -r com.apple.quarantine ~/Applications
Abductor answered 31/1, 2016 at 16:20 Comment(0)
I
4

it's work for me:

open Terminal cd to path Xcode.app
xattr -d com.apple.quarantine Xcode.app
Irksome answered 19/5, 2017 at 3:15 Comment(0)
A
3

You can try the command:

xattr -r -d com.apple.quarantine /your_path_to_xcode/Xcode.app

If you do not use -r, you will have to run the same command for the iOS simulator later on. I am not sure what other executables are hidden in this bundle and are quarantined.

If you have time, the recommended method is to leave the verification to complete so that everything is verified properly.

Auten answered 22/6, 2016 at 1:56 Comment(0)
S
3

I had the same issue (Macbook Pro, Mid 2015, OS X 10.11.15) and was able to fix it without using the terminal to bypass Gatekeeper:

  1. Trash all previously downloaded versions of the file and empty the trash. (If you haven't emptied your trash in forever this may take a long time. You can selectively delete the offending .xip files manually to save time.) I found multiple instances that would not delete because they were currently in use.

  2. Restart your computer. Now you should be able to delete any .xip files in the trash without issue.

  3. Download the Xcode8 beta again (don't stream media while doing this to save on time and packet loss.) and open it.

  4. If this doesn't do the trick, open up terminal and follow one of the answers above.

Setser answered 7/7, 2016 at 18:22 Comment(0)
N
1

Run the following command making sure this is your Xcode's location on the system & replace the xcode name with actual name which code be xcode2 or Xcode 3 incase if you have more versions of Xcode on your machine.. All the best ..

xattr -d com.apple.quarantine Xcode.app

Nixon answered 24/9, 2015 at 16:25 Comment(0)
A
1

Just wait for process to get over with.. sometimes it takes longer than the usual time but ends up showing the alert boxes for next process! sit back let it finish. :)

Abernethy answered 6/4, 2016 at 17:37 Comment(0)
G
0

If you are not logged in to Xcode try logging in with any Apple account.

Gonsalez answered 28/9, 2020 at 17:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.