Xcode won't start, stuck on 'Verifying "Xcode"...'

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?


Solution 1:

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

xattr -d com.apple.quarantine '/Applications/Xcode.app'

Solution 2:

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.