原因
经常是因为在电脑上装了新版的Xcode,比如Xcode11,同时共存了Xcode10,于是打开Xcode10就报错了。
报错信息:
2020-04-22 16:26:39+08 zhangjiedeMacBook-Pro Xcode[21853]: Package Authoring Error: PackageInfo bundle reference found without top-level bundle definition. Bundle will be skipped: <bundle id=""></bundle>
2020-04-22 16:26:39+08 zhangjiedeMacBook-Pro Xcode[21853]: Package: PKLeopardPackage <id=com.apple.pkg.MobileDeviceDevelopment, version=10.3.9000000000.1.1488876279, url=file:///Users/Javen/Desktop/Xcode10.1/Xcode.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg> Failed to verify with error: Error Domain=PKInstallErrorDomain Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted." UserInfo={NSLocalizedDescription=The package “MobileDeviceDevelopment.pkg” is untrusted., NSURL=MobileDeviceDevelopment.pkg -- file:///Users/Javen/Desktop/Xcode10.1/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7fd770460e30 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}}
2020-04-22 16:27:39+08 zhangjiedeMacBook-Pro Xcode[21917]: Package Authoring Error: PackageInfo bundle reference found without top-level bundle definition. Bundle will be skipped: <bundle id=""></bundle>
解决办法
把系统时间改到以前,比如2018年(现在是2020年),然后可以正常打开了。
网友评论