Xcode-beta is damaged and can't be opened

I've downloaded Xcode 7 beta, mounted the dmg, and copied it to Applications. When I attempt to run, I get this alert:


“Xcode-beta” is damaged and can’t be opened. You should move it to the Trash.


So I trash the app and the dmg, then repeat. I've done this maybe 5 times now and it never does work.


How can I resolve this? I'm running 10.11.

Answered by rhbarber98 in 7395022

It is most likely an issue with Gatekeeper. I have seen this exact situation before with prevoius beta releases. To fix, go to Preferences > Security & Privacy, click the lock in the bottom left and enter your password, then click on "Allow apps downloaded from anywhere". Next, right-click on the XCode 7 beta in your applications folder, and click "open". A warning will come up, click on open in that dialog. This will add an exception to Gatekeeper. You can now go back into preferences and set your "Allow apps from..." back to your previous setting, and Xcode 7 will now open from launchpad like usual.


Hope this helps!

Accepted Answer

It is most likely an issue with Gatekeeper. I have seen this exact situation before with prevoius beta releases. To fix, go to Preferences > Security & Privacy, click the lock in the bottom left and enter your password, then click on "Allow apps downloaded from anywhere". Next, right-click on the XCode 7 beta in your applications folder, and click "open". A warning will come up, click on open in that dialog. This will add an exception to Gatekeeper. You can now go back into preferences and set your "Allow apps from..." back to your previous setting, and Xcode 7 will now open from launchpad like usual.


Hope this helps!

Thanks so much! The error dialog was leading me to believe that something was wrong with the .app package, so I tried to run it from the command line and it ran fine. So I was quite confused! Glad I found this!

Glad that helped Carbamide! This seems to happen a lot if you download any apps from a source other than the app store. Many developers like myself either do not or are unable to purchase a developer subscription, so we are forced to distribute our apps in the unsigned state and from our websites. You would be suprised how many developers distribute unsigned apps simply because they either dont have a credit card (like me) or they cant afford a subscription.

That is not a fix, it's a workaround. I don't imagine that Xcode is compromized in this case, but if it had been the suggested workaround would not be a safe thing to do.


If anyone is still hitting these issues with more recent versions of Xcode and OS X, please grab a sysdiagnose report and attach it to a new bug report (using the Report Bugs link at the bottom of this page). Thanks!

Xcode-beta is damaged and can't be opened
 
 
Q