Xcode gives "spotlight quit unexpectedly" error message - xcode

After updating to the newest version of Xcode 12, I started getting a "spotlight quit unexpectedly" error message. I uninstalled Xcode and the error message went away, but when I look in Launchpad the Xcode icon is still there and can't be deleted. Anyone have any idea how to fix this?

Clicking "x" on the jiggling icons in the Launchpad has not been a robust method to delete apps, in my experience. Some apps are root-owned (check by ls -la) so this method never even prompts for root password, let alone deleting the apps.
Best way is to use uninstaller or in-app buttons to uninstall it. This cleans up the contents in ~/Library or /Library and any Launchdaemons or Launchagents.
For Xcode, no such thing is there, so move Xcode app to Trash using Finder.
Also delete ~/Library/Developer if you'd like.
https://apple.stackexchange.com/questions/258733/how-to-show-hidden-files-on-mac-without-terminal/264473#264473

Related

I updated Xcode by hand -- App Store keeps trying at night

TL;DR: It appears that Xcode now auto-updates overnight if your Mac is connected to power. I did a manual install, but the (stalled) auto-update still tries overnight. How do I kill this zombie? (Yes, I can turn off auto-update in App Store, but I don't want to. And anyway, the problem would persist when/if I turned it back on.)
Longer: The following steps happened
Yesterday morning my Mac had the error dialog (paraphrasing here) "Could not update, you must quit Xcode"
I quit Xcode
Clicked "Update" in App Store app
Update stalled at 90%, App Store said "Pending"
(Simulator was still running; could have been the problem)
This stalling is a common problem, dealt with in many posts here, notably
Xcode update stuck after updating macOS
Xcode update stuck on "update"
I went to https://developer.apple.com/download/more/ and got and
installed the update by hand
That wasn't the end of my problems; see
Broken xib with xcode 10.3
This morning, I was welcomed with the same "Could not update, you
must quit Xcode" error dialog.
The App Store app still says "Pending" for this update. Apparently you used to be able to press the Option or Control-Option keys to reveal a "Cancel" button, but no longer.
Q: How do I cancel this pending update, short of de-installing current Xcode and re-starting the App Store process? (See How to Completely Uninstall Xcode and Clear All Settings)
Note: FWIW the file
~/Library/Application Support/App Store/updatejournal.plist seems to say my latest version is 9.2.
Note: another suggestion at https://apple.stackexchange.com/questions/345910/how-to-delete-partially-downloaded-updates-in-high-sierra is to delete all contents of $TMPDIR../C/com.apple.appstore/ but that seems drastic.
Note: In Launchpad, the Xcode icon has a blue dot next to it. Could my solution really be as simple as deleting the Xcode icon? Plenty of similar suggestions all over the web...
This seemed to do the trick: sudo softwareupdate --clear-catalog

Xcode failed to download. Use the Purchases page to try again. Xcode 9.3. MacOS High Sierra

After upgrading MacOS to High Sierra, I tried to update Xcode and get this:
Xcode failed to download. Use the Purchases page to try again
I uninstalled Xcode and try to install again with no success.
I read some tips to solve this but nothing helps...
Remove ~/Library/Cookies/com.apple.appstore.plist (no such file)
Use AppStore Debug menu... (menu never appears with the command to enable it)
defaults write com.apple.appstore ShowDebugMenu -bool true
Remove contents of /private/var/folders///C/com.apple.appstore (folder located, contents removed, nothing changes)
"wiping all caches, cookies amd such like" (how to do that?)
Reset AppStore (uh?)
LogOut, quit, restart Mac (done, no changes)
Quit AppStore process and try again (done, no changes)
Review payment options (done, no changes)
Yes, the drive has enough space
I had the same issue and finally got this working, however I'm not sure exactly which step made it work, so I'm posting all of them.
From https://apple.stackexchange.com/questions/245406/how-to-fix-reset-app-store-app-on-mac-osx-el-capitan:
Delete:
~/Library/Caches/com.apple.appstore
~/Library/Caches/storeaccount
~/Library/Caches/storeassets
~/Library/Caches/storedownload
~/Library/Caches/storeinappd
I didn't have some of those folders, but I did have a couple of extras that looked fishy, so I deleted them too:
~/Library/Caches/storeassetd
~/Library/Caches/storedownloadd
Run sudo softwareupdate --clear-catalog [Note: I did this but I don't think it helped]
From http://osxdaily.com/2016/10/08/mac-app-store-temp-cache-folder/ (paraphrasing):
Quit out of the Mac App Store
Open Terminal and run open $TMPDIR../C/com.apple.appstore/
Hit Return and the com.apple.appstore folder will open in the Finder of Mac OS
Delete the contents of this folder
And finally:
Navigate to ~/Applications in Finder and move Xcode to the Trash [Note: This step was necessary for me, but ymmv]
Reboot
Launch App Store. Search for Xcode. Install it fresh.

How to uninstall Xcode 6 and remove all related files

I need to completely reinstall Xcode 6 and remove all the files and settings with it.
I know that it is uninstalled so that you go to mission control, long click on it and then click on the X button, like on iPhone.
I also know that you can drag it to trash from applications.
But after all those, when I install it again through AppStore and open the last project I was working on, Xcode will open the project on exactly the same class where i t was shut down and even show the last error I faced!
I don't want that. That means that some User Preferences are still saved somewhere and I want to get rid of them as I have never ever had Xcode installed on my Mac.
How to do that?
You can use several uninstall programs like you would uninstall any other Mac application.
So some examples might be App Cleaner or Clean My Mac.
Hope that helps :)

Why iPad app build fails in xcode with a error creating temporary directory?

I'm using Xcode 4.6, and trying to run a simple app in iPad 6.1 Simulator, build fails with error message
mkdir: /Users/chakradar.r/Library/Developer/Xcode/DerivedData/dino-eddkhtnsnrlgwjgqnaceabrxcjsh/Build/Products/Debug-iphonesimulator/dino.app/wwwof: File exists
that is a temporary directory, i even tried building it after removing the directory, it again fails with a similar message.
Once my Xcode went unresponsive so I force quit Xcode while this application was running, I suspect that could be the reason for the failure. Error message is not helping, how can I fix this situation?
While I don't know the exact reason you're getting this error. Here are some generic steps that you can try in these situations:
In the simulator app go to 'iOS Simulator' (in the top menu), choose 'Reset Content and Settings...'
In Xcode go to 'Product' then 'Clean'
In Xcode go to 'Window' then 'Organizer', click on the 'Projects' icon on the top, find your project in the list on the left and click 'Delete...' beside the 'Derived Data'
Restart your Mac (Yes, sometimes this really resolves some issues)
You can try any of these options individually or all of them.
I too even don't know the exact root cause but
Killed both Xcode and Simulator and ran the app again and it started working for me.

mac stuck while re-installing xcode?

I recently had a problem with Xcode 3.2.6 and decided to reinstall it. I tried to uninstall the previous one before but wasn't able to. The instructions said to run a line in a terminal window but I kept getting the message that Xcode was not found. Anyway, I decided to do a not-so-clean reinstallation and clicked on the dmg to install it.
Everything went fine until now, there is a message that reads
"running package scripts"
"install time remaining: 2 min"
it has been like this for the last 20 minutes!!!!!! what should I do?????? should I force it to quit with activity monitor? should I wait longer?
HELP PLEASE!!!!!
Actually, I know now what happened... during the installation process it asked me to close iTunes, which I did, but the window asking for it remained opened. It occurred to me to check if there was something else from iTunes opened in the activity monitor, and there was! iTunes has an "iTunes helper" that opens automatically and doesn't close when you close iTunes. I forced the helper to quit and that unblocked the installation process!

Resources