It looks like XCode came out with a new update. This issue seems to be persistent where the iTunes Store does not render the update even though it posts it in the "Updates Installed in Last 30 Days" section. After I restart, I am then prompted to update again even though I have already done it twice. Ultimately, the update does not apply when I open XCode (it still shows 7.3, not 7.3.1):
There is only one way! For this you need:
1. Delete the XCode 7.3 from Applications folder
2. Download the Xcode 7.3.1 from here
3. install it manually
That's it))
A possible method of resolving this issue which has worked for people including myself, is as follows:
Close App Store.
Using terminal type the following:
open $TMPDIR/../C
Locate and then delete the folder named com.apple.appstore
Empty Trash folder, if you get an error message saying that files are in use try the following:
sudo rm -rf ~/.Trash/*
Restart Mac.
Once you have restarted your Mac try to install the update.
If this does not work delete Xcode from /Applications and repeat the above method.
Related
For example:
Any ideas?
MacOS High Sierra 10.13.1
Xcode 9.1 9B55
As KellyTheDude mentioned, renaming or moving the Xcode.app will fix the issue on OSX 10.13 (High Sierra) since /usr/libexec/xpccachectl (the preferred solution) does not seem to exist under this version of the OS. To fix quickly:
Rename Xcode in the applications folder temporarily.
Name it back to Xcode
UPDATE: This fix also works on macOS Mojave (10.14) and Xcode 10
UPDATE: This also fixes the Xcode Source Editor not showing up in System Preferences under Extensions (for Swiftify, etc.)
Oddly I was able to fix this by moving my Xcode.app to Applications. I originally had it nested in a subdirectory under there to version it, but alas, someone must have hardcoded a path somewhere.
I fixed this by quitting Xcode and deleting all the files in directory ~/Library/Developer/Xcode/DerivedData/.
This happens to me once in awhile and deleting derived data and restarting Xcode doesn't work for me. I usually have to do the following:
Close Xcode
Execute command in terminal: sudo /usr/libexec/xpccachectl
Restart my computer.
Restarting the computer is a required step.
Source: Apple Forum
I had the same issue with Xcode10.1.
All Answers here did not work for me.
I was able to solve this issue only by reinstalling Xcode.
Delete Xcode10.1 and empty trash.
Delete all files in ~/Library/Developer/Xcode/DerivedData/ directory and empty trash.
Restart Mac.
Download and install Xcode10.1.
Step 1:
Xcode > Preferences > Key bindinds > Now Search for "Documentation" in search bar you will see key for Add Documentation
Step 2:
Double click and assign new key as "Alt + Control + /"
Result: It will work now but if you want to change it back to what it was (Alt + command + /) you can do that.
Also, this will enable the Add Documentation in Editor > Structure
Its a hack and worked for me.
I just upgraded to Mountain Lion (from Snow Leopard) so as to take advantage of Xcode 4.
Before installing Xcode 4, I would like to remove Xcode 3 (not required, but want to clean up before moving on).
The standard method of removing Xcode 3 is:
$ sudo <Xcode>/Library/uninstall-devtools --mode=all
However, when I issue this command, even from within the /Library folder, the only thing that happens is I get a "command not found" after entering my password.
I can see uninstall-devtools in Finder, so I know it's there. I just can't execute it for some reason. I've tried every possible way of running the uninstall tools.
Assistance is greatly appreciated. Thanks.
If the file really is there, type sudo in the terminal window (with a trailing space), drag and drop the uninstall-devtools file on the window, then append --mode=all. That should clear any chance you have to make a typo or any other mistake.
Similarly to information I found in another SO article, my laptop's old XCode 3.2 didn't even have the uninstall-tools utility.
So it worked fine for me to simply delete the XCode.app folder.
When I try to search the documentation within Xcode I get the following error:
“index.html” is locked for editing and you may not be able to save your changes. Do you want to unlock it?
“index.html” is currently locked because it does not support editing.
The file “index.html” could not be unlocked.
Could not add write permission to the file because you do not own it. Try modifying the permissions of the file in the Finder or Terminal.
I have tried uninstalling and reinstalling without success.
Any ideas?
Here's a solution I found on Apple's DevForums:
I went into Xcode preferences, went to the Downloads option, and
selected Documentation. From there, I clicked 'Check and Install Now'
and it went and downloaded the iOS 5.0 library and 10.7 library. Once
those were downloaded, help seemed to be working again via the local
libraries. Hope this helps get you back on track.
And yes, I've seen the same problem that you've seen. You just need to fully download the documentation.
Update: xCode 4.2.1 fixes this problem.
I worked around the issue in Snow Leopard this way:
Open XCode
Open the organizer ( Window | Organizer )
Select Devices | Provisioning Profiles
Select my phone-provided provisioning profile and click Refresh
You do this silly thing because XCode will then display a dialog asking you to sign in with your Apple ID. If I sign in /here/ instead of on the page in the documentation, it remembers I'm signed in, shows the documentation when I ask, and doesn't crash. I have to do this every time I restart XCode, though.
YMMV.
Simple answer... Have you tried repairing permissions?
How about deleting xCode prefs?
You can chown the documentation to your user, attempt to search, unlock the file, and then chown the documentation back.
Unfortunately, you have to search and unlock for each file individually.
sudo chown -R `id -un` /Library/Developer/Shared/Documentation/DocSets
# Try to search; unlock the file.
sudo chown -R _devdocs /Library/Developer/Shared/Documentation/DocSets
I don’t think it actually modifies the file — I suspect this is a problem with the new versioning feature.
This has helped:
Become super user
% cd /Library/Developer/Shared/Documentation
% tcsh
foreach i ( `find . -name index.html` )
echo $i
xattr -d com.apple.quarantine $i
end
I still get the following on the first search:
Internal Error
Xcode encountered an internal logic error. Choose
"Continue" to continue running Xcode in an inconsistent
state. Choose "Crash" to halt Xcode and file a bug with
Crash Reporter. Choosing "Crash" will result in the loss of
all unsaved data.
[Show Details] [Continue] [Crash]
I pick [Continue] and everything works fine afterwards.
the Better solution is Uninstall Xcode:
sudo /Developer/Library/uninstall-devtools –mode=all
after that, install Xcod
After installing Xcode 4.0.2, I get this error when I try to launch it by double-clicking on an existing project:
Dyld Error Message:
Library not loaded: #rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
Referenced from: /Developer/Developer/Applications/Xcode.app/Contents/MacOS/Xcode
Reason: image not found
Launching Xcode via the dock and opening the project from inside Xcode works fine. Also note that doing a repair install of Xcode did not resolve the issue. I haven't tried completely uninstalling Xcode and installing from scratch, but I would prefer to avoid that as I have my IDE nicely customized the way I like it.
Update: I just tried a complete uninstall of Xcode via sudo Developer/Library/uninstall-devtools --mode=all then rebooted and reinstalled. Still having the same issue.
Before you reinstall, make sure your project file is set to open with the expected copy of Xcode 4. Select it in Finder, press Cmd-I, and make sure the Open With... popup is set to the right copy of Xcode 4.
According to the discussion below, the problem is that it is not in the /Developer/Applications/ folder. However, I think that is just a clue to the source of the problem, because Xcode is supposed to work in multiple locations. It is possible that Xcode sets fixed paths when installed and can't be moved. Did you happen to move it after installing?
http://www.iphonedevsdk.com/forum/off-topic/35948-xcode-crash.html
It is the ALIAS that is busted, not Xcode. If you reinstalled Xcode, you should make a new alias for your Dock or Desktop or wherever. Delete the old alias as it is no good any more.
Xcode (should) install in /Developer . You can get to that by going to your hard drive named something like "Macintosh HD". Make a new alias from there.
I want to remove all existing SDK versions as well as Xcode 4.
Xcode 4 Guide says to do this:
sudo /Xcode4/Library/uninstall-devtools --mode=all
But I don't have Xcode4 at this location and the only place I see it is under /Developer/Applications
I've already run the uninstall-devtools that was previously found in /Developer/Applications and then did a reinstall.
What else can I do to completely remove everything and start from scratch?
I use this command:
sudo /Developer/Library/uninstall-devtools --mode=all
Edit (1 year later):
If you've downloaded Xcode from the App Store, it's self-contained, as #mediaslave suggests. You can just drag it to the trash or use AppZapper (or a similar utility) to remove the developer tools.
If you're looking to update it, you can also do that straight through the App Store.
sudo /[xcode-path]/Library/uninstall-devtools --mode=all
Normally, [xcode-path] means /Developer, but if you have multiple versions, for example 3 is the first installed, 4 is second, /Developer will be xcode 3's root derectory and /Xcode4 for xcode 4.
Ensure Xcode, iOS Simulator, and the Mac App Store apps aren't running, then trying running the uninstall script at this (different!) location:
/Library/Developer/Shared/uninstall-devtools
This is where I found it.
Also delete Install Xcode.app from Applications folder, and Empty Trash.
Then run App Store again, and find/install Xcode.
su (or sudo su, whatever)
find / -name uninstall-devtools
This will reveal where the utility is...
If you have XCode 4.3.1, just Move To Trash the XCode.app file in the Applications folder.
If you have installed xcode from Mac App store, then you need to delete it from Launch pad. You can do this by locating xcode icon in launch pad, long click on the icon till it starts dancing. Then delete it and wait for a while till the xcode.app is deleted from /Application. If you manually delete xcode.app from /Application, App store will continue to think its installed and will not allow you to reinstall in future.
I tried to uninstall this by deleting it, but the AppStore still thought that it was installed. I deleted some preferences files in my /private directory, which made the AppStore "forget" that I had installed Xcode. I used the following command:
sudo find / -iname '*xcode*' 2> /dev/null | egrep '^/private.*' | xargs -I file sudo rm -rfv file
Which deleted the following files from my computer:
/private/var/db/receipts/com.apple.pkg.XcodeMAS_iOSSDK_6_1.bom
/private/var/db/receipts/com.apple.pkg.XcodeMAS_iOSSDK_6_1.plist
/private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503/CachedSpecifications-Xcode
/private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503/CachedSpecifications-xcodebuild
/private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503
I do not know what these files are used for, but it made the AppStore forget that it was installed, which is what I needed to happen. In my case, the AppStore was not allowing me to update to the new version of Xcode.