Xcode does not open on Mac yosemite 10.10.3 - xcode

My Xcode got crash and it does not open when I try to reopen. I've tried to open other versions of Xcode from applications too. None of the Xcode app responding.
I've tried restarting the Machine too. No luck. When I try to open from terminal (using sudo open --new /Applications/Xcode.app).
I'm getting this error
LSOpenURLsWithRole() failed with error -10810 for the file
/Applications/Xcode.app.
I've got wasted lot of time on this. Please help me out.

Your Xcode installation seems corrupted. Delete and reinstall Xcode from the app store.

Related

MobileDevice.pkg untrusted, cannot open Xcode after OS X update

After an automatic update of macOS v10.15 (Catalina), I am unable to open Xcode. Xcode prompts me to install additional components but the installation fails because of MobileDevice.pkg (Applications/Xcode.app/Contents/Resources/Packages)
I have found multiple answers on how to locate MobileDevice.pkg and that I should try to install it directly, but when I try to do this the installation fails too. I have also tried updating Xcode from App Store, but the update failed when it was nearly finished.
Has anyone experienced the same behaviour? Should I reset the Mac to default and install macOS v10.13 (High Sierra) or Catalina from scratch or it is a problem of Xcode and re-install would do the job?
I have found a discussion here that was posted today and is probably regarding the same issue and it seems like many people are dealing with it, too.
The log:
*2019-10-25 01:03:34+02 Vendula-MacBook-Pro Xcode[1567]: Package: PKLeopardPackage
<id=com.apple.pkg.MobileDevice, version=4.0.0.0.1.1567124787, url=file:///Applications/Xcode.app/Contents/Resources/Packages/MobileDevice.pkg>
Failed to verify with error: Error Domain=PKInstallErrorDomain Code=102
"The package “MobileDevice.pkg” is untrusted."
UserInfo={
NSLocalizedDescription=The package “MobileDevice.pkg” is untrusted.,
NSURL=MobileDevice.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/,
PKInstallPackageIdentifier=com.apple.pkg.MobileDevice,
NSUnderlyingError=0x7fabf6626d00
{
Error Domain=NSOSStatusErrorDomain
Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED"
UserInfo={
SecTrustResult=5,
PKTrustLevel=PKTrustLevelExpiredCertificate,
NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED
}
}
}*
Edit and set the date of your Mac as October 1st, 2019.
I didn't have Xcode 11.1 installed and even though I could open and run the 11.0 after the below workaround I could not update to 11.1 as the update always failed. So I have just re-installed the whole app from the App-Store - you could probably also do this instead of the below method.
I have tried setting my system time to 1st October 2019 when the certificate should had been still valid. After that I tried to open Xcode and followed the component install which went well and now I am able to work with Xcode again.
I had a similar problem, where I installed Xcode 11.1, and installed the components and everything within the same folder where I had Xcode 10.2.1. Then, I tried to go back to Xcode 10.2.1 and couldn't opened as it was asking me to install components again, and when I tried I was getting this error.
The package “MobileDeviceDevelopment.pkg” is untrusted.
So, the workaround that fixed it for me was navigating to...
/Users/YourUser/Applications/Xcode\ 10.2.1.app/Contents/Resources/
Then, deleting MobileDeviceDevelopment.pkg and everything went back to normal :)
I hope this helps anyone else with this issue. Cheers!
At macOS Catalina
cd /Applications/Xcode.app/Contents/Resources/Packages
sudo rm -rf MobileDevice.pkg
sudo rm -rf MobileDeviceDevelopment.pkg
Try again.
It means you entered on the Xcode downloaded packages and remove it. I really don't understand how Apple do but if you remove Xcode will download it again and revalidates.
Some remarks, I'm on XCODE Version 11.0 (11A420a) if you are not this is not guaranteed to work.
You may solve this issue by setting the date of your Mac as October 1st, 2019. But this is just a hack! The real solution (suggested by apple) is this:
All you have to is to upgrade Xcode
But there is a known Issues on apple developers site
Xcode may fail to update from the Mac App Store after updating to macOS Catalina. (56061273)
Apple suggests this:
To trigger a new download you can delete the existing Xcode.app or temporarily change the file extension so it is no longer visible to the App Store.
Always working solution for all Xcode issues:
Go here and log in.
Then download the xib from here.
More information here on this answer.
##Answer to this specific issue##
Get rid of those packages.
cd /Applications/Xcode.app/Contents/Resources/Packages
sudo rm -rf MobileDevice.pkg
sudo rm -rf MobileDeviceDevelopment.pkg
Xcode will install all of them again for you.
rm -rf /Applications/Xcode.app/Contents/Resources/Packages/*.pkg
It will work and re-open the x-code
Try to run Xcode-beta instead of Xcode to install additional components. After that you'll be able to use Xcode release.
For me, I just uninstalled (deleted the app from the Applications folder) and then went back to app store and clicked the cloud icon and it downloaded fresh and installed. Now all is good and back to normal.
Here's what I did to resolve:
Right click the xcode.app > show package contents > Contents > Developer > Platforms > iPhoneOS.platform > Device Support
I am on XCode 10.2.1. I had downloaded a 13.7 folder and contents from an external GitHub site and imported that folder into here for running my app on a physical iPhone Xr. I am prevented from upgrading to Catalina on my dev machine. Deleting the 13.7 folder and then re-launching XCode resolved the issue for me.
Reinstall Xcode 11.1 from https://developer.apple.com/download/more/ . Afterwards the update works.
This requires Xcode 11.1 to be installed.
I was not able to update to Xcode 11.1 until I updated macOS Catalina to 10.15.1. After updating my macOS, I was able to install Xcode 11.1, which also allowed the installation of the additional components package.

Failed to find a suitable device for the type IBSimDev

I'm getting the following 2 errors that seem that alternate every time I try to build. I just upgrade my iOS to 12.2 which forced me to upgrade my osx to Mojave 10.14.4 and my xcode to 10.2.
Failed to find or create execution context for description.
Filed to find a suitable device for the type IBSimDeviceTypeiPad2x in
Assets.xcassets
This I have tried:
Cleaning Build Folder (repeatedly)
Closing and restarting Xcode and the simulator
Deleting Derived Data
I had faced the same issue my issue resolved by doing:
Clean build folder (shift + command + K)
Restart your system (Mac)
Note: Also missing simulator after updating to Xcode 10.3 fix by this solution.
Run this command in the terminal to make sure all simulator process in the background are killed :
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Well I don't know how many other people this is going to help out but here was my issue:
I poked around and finally got another error that said that my simulator runtime is not available. What ended up solving it was simply restarting my macbook found from this thread: The iOS 8.1 simulator runtime is not available error in Xcode 6.1

Xcode10.1 not launching

I have Mojave OS in Mac. and updating to Xcode10.1 from Xcode10.0.
But it's not launching at all. Alert is showing like below :
Your Xcode installation seems corrupted.
Try to completely uninstall and reinstall it.

Xcode9 could not launch"app"

Xcode could not launch my app
Today, I upgraded Python version 3.6, deleted the Python2.7 file, and I found that my Xcode9 couldn't be opened. I copied a Python2.7 file and a "current" file from my classmate. Then Xcode can open, but when running app, Xcode reminds me, "could not launch app", I tried a lot of ways, but can not find a solution. The simulator just shows the boot screen, and app gets stuck.
APP launch Screen
OK,I found the way to solve my question.I found the Xcode problems was about the system Python version(2.7),so I deleted my Python3.6,and reinstall Python2.7 by homebrew, configured the environment variables.And then the Xcode9 is working right.

XCode 4.6.3 showing link error ibtool failed with exit code 10

I installed XCode 4.6.3. Initially I was able to successfully able to build and run my code on it. However, all of a sudden when trying to configure my build on my iOS device, the build failed and showed the following error message - Command/Applications/Xcode 4.6.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 10
I tried various methods. I cleaned the App. I reinstalled Xcode. I deleted keys and certificates from Keychain Access. Its of no use. The Xcode is always showing this same error message. I created a fresh new sample project in this Xcode, it is still showing the same error message.
My Mac machine previously was Snow Leopard. I recently upgraded it to Lion OS X version 10.7.5
Please tell me what I should do to solve this issue. Thanks in advance.
Try making a clean new project, and see if the error persists.
And make sure you don't delete any important files like the
main storyboard or any xib-files.

Resources