Xcode error when start - xcode

When I open xocde, it pops a window, and tells me:
"xcode scanning for plug-ins failed.
You may not have appropriate permission to read or load installed plug-ins."
I don't know what to do ?

you need to reinstall the xcode,See the link for solution that may help you to resolve the problem
XCODE fail to load platform

Do you have two versions of XCode installed ?
If yes then ideally you should install the XCode with different versions in different directories. May be you installed lower version of XCode on top of higher version and then trying to launch the XCode.

Quit the xCode.
Reinstall all plug-ins for xcode. It was helpfully for me.
reinstall xcode if nothing help..

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.

xcode 10.0 on Macports

I am new to using Macports to download software I have just upgraded to Mojave and have made sure I have the latest versions of both Macports and Xcode command line tools. I have been getting the message
Warning: xcodebuild exists but failed to execute
when trying to download gnuradio. I then used 'port diagnose' and received the following message:
Error: currently installed version of Xcode, none, is not supported by MacPorts. For your currently installed system, only the following versions of Xcode are supported: 10.0
This is despite the fact that I am using xcode 10.0 and have never run anything earlier than that. Am I missing something or could it be that Mojave hasn't been available for long enough for possible bugs to be solved with the programs. If anybody has an alternate way of running gnuradio-companion i'd be happy to hear. I have already tried via home-brew but ran into problems with that as well.
Thanks for your help,
Arthur
#Wallace Huang's answer worked for me (Mojave 10.14.6):
Open Xcode
Select Preferences -> Locations
Command Line Tools version gives a drop down menu and I was able to select the single option for which version of Command Line tools I have.
Screen shot of Xcode Preferences
In Xcode 10, go to Preferences, select Locations tab, and choose a version in Command Line Tools. On a fresh install, this field is blank (hence your version is "none").

Xcode error connecting to simulator "Software caused connection abort"

When I try to run my project through the Xcode simulator, it keeps giving me the error "Software caused connection abort".
Tried restarting the simulator & Xcode, and I recently deleted the DerivedData folder as suggested in this post about broken playgrounds so that also didn't help.
QUICK FIX
This is happening because you have multiple versions of Xcode installed. MacOS unfortunately only supports running one version of Xcode at a time, and it needs to know the location of the currently running version. To sort things out, choose one of the following:
Quit all instances of Xcode and restart it
Try one of the other options below if that hasn't solved it.
Using the command line:
run sudo xcode-select --switch /Applications/your_custom_folder_if_needed/Xcode.app
Restart your terminal and Xcode and it will work just fine.
No-command line users:
Quit all instances of Xcode
Start the instance of Xcode that you want to use
Go to Xcode -> Preferences -> Locations
Select the correct version in Command Line Tools
Done!
It's due to multiple Xcode installed in your system. This is how you make it work:
Quit all running Xcodes
Re-launch Xcode
Go to Xcode > Preferences > Locations
Change to the correct version in Command Line Tools
Clean project and clear Derived data if necessary, then run!
In my case quitting and re-launching given Xcode was enough. I had two Xcodes, stable and beta.
For me, restarting the Mac OS worked (multiple times).

Xcode 5.1 crashing after installing Xcode6-beta version

The application "Xcode5.1.1" can't be opened.
I use x-code 5.1 to build iOS apps, now when i installed x-code6 beta version to implement app with swift language then xcode 5.1 is not working. It is giving me such error-
I use to resolve problem with Xcode 4.6.3 crashing after installing xcode 6 beta but not found this useful for my case.
I have tried to restart machine but it is giving same error. I googled for it but not got useful stuff. Any help would be appreciated.
Try to select different "Command line tools" in the bottom of Xcode -> Preferences -> Locations.
You can do it in your working Xcode 6.
After trying more I found it useful
Restart your machine then it can work, if not like my case then try below command in your Terminal
sudo mv /System/Library/PrivateFrameworks/MobileDevice.framework{,-saved}
then again restart your machine then it will ask for installing few components of Xcode so allow it, then your Xcode 5.1.1 will work fine.

How do i install additional packages for Xcode on OSX Lion to allow MacPorts to work

When I try and install MacPorts it complains
'Xcode is not installed, or was installed with UNIX Development (10.5+) or Command Line Support (10.4) deselected.'
I do have Xcode installed from the Appstore so I guess I just have to install these extra parts but how ?
Ive read a couple of questions on Stack Overflow about this but I think the answers must be outdated as they do notmake sense for me, I do not have an Xcode dmg I can reinstall from, and I can't see anything useful in /Developer either, or any preferences within Xcode itself.
I only want Xcode for the purposes of using Macports so I'm not familiar with it.
You probably got Xcode 4.1 from the Mac App Store. In that case, you haven't got Xcode 4.1 installed. However, you now have an Xcode installer in your Applications directory.
Spotlight should find it in any case.
The command line tools aren't included in the default install of Xcode anymore.
Goto the Xcode Preferences --> Downloads Pane --> click the Install button beside "Command Line Tools".
If you don't have Xcode installed you can get the command line tools separately as explained here..
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
The App Store installs the XCode installer, not Xcode itself. The installer is in your applications folder. Run that.
Today, 16 Feb 2012, when I installed Xcode 4 from the App Store, there was no Setup. Just the app installed, because it was Xcode 4.3 !
Make sure that you install Xcode 4.2 with UNIX Devel. to MacPorts works!
To get the Xcode 4.2 go to https://developer.apple.com.

Resources