title: Xcode not opening after updating to MacOS Catalina
body: <p>I updated to MacOS Catalina and now my Xcode is not opening. I get this prompt:</p>
  
  <p><a href="https://i.stack.imgur.com/X5fSa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/X5fSa.png" alt="enter image description here"></a></p>
  
  <p>Which leads to this error after getting root access:</p>
  
  <p><a href="https://i.stack.imgur.com/OKJFX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OKJFX.png" alt="enter image description here"></a></p>
  
  <p>There is a huge log but the key errors are:</p>
  
  <blockquote>
    <p>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</p>
    
    <p>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</p>
    
    <p>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}}}</p>
  </blockquote>
  
  <p>I have already tried: </p>
  
  <pre><code>xcode-select --install
  </code></pre>
  
  <p>and</p>
  
  <pre><code>xcode-select --reset
  </code></pre>
  
  <p>Has anyone else run into this issue? How to fix it?</p>