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

匿名 (未验证) 提交于 2019-12-03 03:05:02

问题:

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.

回答1:

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.



回答2:

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.



回答3:

Depending upon gatekeeper settings.please check gatekeeper settings to allow anywhere and revalidate Xcode.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!