Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"/Applications/Xcode.app: a sealed resource is missing or invalid" error while validating Xcode installation

Today I got the memo from Apple as probably every other Apple developer about potentially infected Xcode installations. (https://developer.apple.com/news/?id=09222015a)

I followed the instructions and tried to validate my Xcode app using the command mentioned. (spctl --assess --verbose /Applications/Xcode.app) The program ran for a while and exited with a "/Applications/Xcode.app: a sealed resource is missing or invalid" message.

The article says "Any result other than ‘accepted’ or any source other than ‘Mac App Store’, ‘Apple System’ or ‘Apple’ indicates that the application signature is not valid for Xcode." However, I'm actually pretty sure my Xcode copy is legitimate (downloaded and updated via App Store with Gatekeeper enabled) so I thought maybe there could be another problem preventing it to validate as it should.

Do you have any ideas what this error message actually means? Do you think I need to reinstall Xcode just in case?

Thanks in advance for your help.

like image 592
Şafak Gezer Avatar asked Sep 22 '15 17:09

Şafak Gezer


2 Answers

The false positive validation issue appears to be caused by containing previous iOS SDKs in order to be backwards compatible.

A clean install will completely wipe the SDK directories. When you run the validation test after a clean install it will pass. Once you copy previous iOS versions, which, for us, is iOS 8 for iPhone, the validation will fail.

This scenario was tested after updating to XCode 7.0.1 (7A1001) which was released earlier this afternoon.

In order to avoid a clean install, you can temporarily remove the previous SDK version from their respective location, and run the validation. Then, once the validation passes, copy the files back where they belong.

like image 184
Shawn Roser Avatar answered Oct 02 '22 08:10

Shawn Roser


I was getting the same message "a sealed resource is missing or invalid". However i was able to rectify the issue by going into the App Store and downloading the latest version of Xcode - Version 7.0 (7A220), and this seems to have rectified the issue.

Although i did first try updating Xcode through the updates section on the App Store, but for some reason this didn't work. So i would recommend going into the App Store > Search for Xcode > Then install the latest version available to you.

like image 31
M. Nazir Avatar answered Oct 02 '22 08:10

M. Nazir