Unable to use XCode 4 for launching .xcodeproj - xcode

Despite setting XCode (4.0.1) as the default launcher on the info panel of a xcodeproj file and clicking the "Change All" button, xcode projects still seem to launch XCode 3.
My XCode 3.2.5 is installed in /Developer and XCode 4.0.1 in /XCode4
Should this be a problem?

Answering my own question.,
Apparently, renaming /Developer to /XCode3 and /XCode4 to /Developer fixed this.
Not sure if anyone else have this issue.

Have you try to Open XCode4 and load the xcodeproj? If it works, then there's no problem with XCode4 itself. Otherwise, try to use Open With in the context menu.

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.

Why Xcode lost code snippets when reopen?

Anybody know why My Xcode lost code snippets when I reopen the Xcode?
I try to reinstall and upgrade the Xcode, It's does't work. Thanks!
System: macOS Sierra Version:10.12.2
Xcode: 8.2.1 (8C1002) (version 7 also have this problem).
I solution this problem by myself. I found in /Users/Caohr/Library/Developer/Xcode/UserData don't have the CodeSnippets Folder, But have a shortcut of CodeSnippets. And I deleted the shortcut and build new folder of CodeSnippets. It's working!

Uninstall Previous XCode and Install XCode 4.5

Is it safe to completely uninstall previous version of XCode and Install the XCode 4.5? because...
I just uninstalled XCode 4.2, and it mostly removed all the files in the Developer Folder, now I installed the 4.5, but it scares me since there is nothing in the Developer Folder.
Would XCode still be working even if that's the case? Thanks
Xcode 4.4+ was designed to be installed via the App Store and now stores everything in the Xcode.app bundle in your /Applications directory.
Make sure you use xcode-select to select the new path for your Xcode installation, and you install the command line tools from within Xcode 4.5.
From the Xcode 4.5 release notes:
Starting in Xcode 4.3, the Xcode.app file package contains all the Xcode developer tools. The man pages for the command-line tools Xcode uses are also placed in this package.
yes It's totally safe to completely uninstall the previous Xcode and install new Xcode4.5. I have done it and all works fine for me.
Just have to install the command line tools after installing the Xcode4.5 from it's preference just as show in below image :)

How to unistall xcode 4.3.2?

I need help to unistall xcode 4.3.2
I tried in terminal
sudo Developer/Library/uninstall-devtools --mode=all
but error, please help
Starting with Xcode4.3, just drag the app to the trash to uninstall.
As of Xcode 4.3 I believe (it's recent), Xcode is no longer in /Developer but is now a regular app in OS X ... so to uninstall it, just delete the /Applications/Xcode directory.
The best way to uninstall an Application from Mac is that use "Clean My Mac"
Simply open Clean My Mac, Go to Uninstall Application tab and then drag and drop your application icon to it. Your application will uninstall completely from your Mac.

Xcode error when start

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..

Resources