Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode not opening after updating to MacOS Catalina [duplicate]

Tags:

xcode

ios

I updated to MacOS Catalina and now my Xcode is not opening. I get this prompt:

enter image description here

Which leads to this error after getting root access:

enter image description here

There is a huge log but the key errors are:

2019-11-04 12:39:48+05 tk_lpt_0141_wifi Xcode[1214]: Package: PKLeopardPackage 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:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7fe07012cad0 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}} 2019-11-04

13:01:20+05 tk_lpt_0141_wifi Xcode[1306]: Package: PKLeopardPackage 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:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7fd230cb1ae0 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}} 2019-11-04

13:29:51+05 tk_lpt_0141_wifi Xcode[1377]: Package: PKLeopardPackage 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:///Applications/Xcode.app/Contents/Resources/Packages/, PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment, NSUnderlyingError=0x7f8ab8ba9380 {Error Domain=NSOSStatusErrorDomain Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5, PKTrustLevel=PKTrustLevelExpiredCertificate, NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}}

I have already tried:

xcode-select --install 

and

xcode-select --reset 

Has anyone else run into this issue? How to fix it?

like image 755
NSNoob Avatar asked Nov 04 '19 08:11

NSNoob


People also ask

Why can't I open Xcode on my Mac?

Question: Q: XCode doesn't open Answer: A: I suggest removing Xcode and then reinstall it. To do this, launch the application "Launch Pad", then type Xcode in the search field, then, when you see the icon for Xcode, click and hold (the same way you would on an iOS device) until the "X" appears in the corner.

Does macOS Catalina support Xcode?

Per https://developer.apple.com/support/xcode/ , XCode 12.4 is the latest version that runs on Catalina. You will need a newer version to submit to the App Store.

Can Xcode 12 run on macOS Catalina?

Xcode 12 requires an Intel-based Mac running macOS Catalina 10.15. 4 or later.

How do I update Catalina Xcode on Mac?

The Mac App Store will notify you when an update is available or you can have macOS update automatically as it becomes available. The latest beta version and previous versions of Xcode can be downloaded from the Downloads page. To download Xcode, simply sign in with your Apple ID.


2 Answers

First, try updating Xcode through the app store

As a last resort, you can change your MacOS Date to

1st October 2019 

I set my system time to 1st October 2019, the date when the certificate was still valid. Then, I opened Xcode and followed the component install. This went well, and now Xcode works again.

Edit and set the date of your Mac as 1st October 2019.

like image 88
Vinod Kumar Avatar answered Sep 28 '22 08:09

Vinod Kumar


What worked for me was updating Xcode in the App Store. After that I was able to install the additional components successfully.

like image 27
Lily Pham Avatar answered Sep 28 '22 06:09

Lily Pham