You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Clean Xcode install - how?

I was enjoying and making good progress on my first SwiftUI project when suddenly Xcode refused to load. It crashes when I invoke it even though my Xcode and MacOS are up-to-date (MacOS 14.3.1 Xcode 15.2)


I discovered an Apple page to report and upload the Xcode sysdiagnose but when I invoke the command to create logs

sudo sysdiagnose Xcode 

I receive the error


Invalid target Process/pid specified


I couldn't find the Windows equivalent of deinstall so I deleted the Xcode software using the context menu from the Launchpad and re-installed it from the App Store but Xcode still crashes and dumps while starting:


Xcode quit unexpectedly

  1. How do you perform a clean install of Xcode on the MacOS?
  2. Is there a way of compiling SwiftUI code without Xcode to continue to make progress with the App? I do have iOS devices and I could transfer the source code project to one of them or upload to the Cloud.


MacBook Air

Posted on Feb 10, 2024 10:25 AM

Reply

Similar questions

5 replies

Feb 10, 2024 10:40 AM in response to alanrick

Usual is deleting the app bundle, maybe restarting through Safe Mode and then normally to clear any remaining caches, and reloading the bundle. But that’s not where I’d start with this.


The sysdiagnose command is this:

sudo sysdiagnose


Please download and run (free) EtreCheck and share the report to the clipboard. Then open a new reply here, and press the Additional Text button that looks like a printed page to get a text input box big enough to paste the hardware and software configuration report here, and paste and post that report here.

Feb 10, 2024 1:43 PM in response to alanrick

For the record, here's how I succeeded.

  1. Deleted the cache and build data from system settings (and rebooted) -> No success. Waste of time.
  2. During xcode loading clicked on the menu before it had a chance to abort to at least hold that thread. I could see that the Xcode was still trying to load my old project even though I'd deleted the cache. Annoying. How did it retain that info? Ugh
  3. Knowing my project was the culprit I renamed it in the git so that xcode wouldn't find it and sure enough Xcode booted ok. Phew.
  4. Opened a copy I'd made of the project (directory copy) and had a look. The abort happened (perhaps with reading the change-management/integration log) when going to the integrate screen. In particular with my localisation file.
  5. Deleted my String Catalog file. Success.


I guess Xcode has problems because I had 2 String Catalogue files, or because of content within the file (German character set? ) . So now all I have to do is translate everything again and keep my fingers crossed that the problem does not re-occur.

Feb 10, 2024 10:55 AM in response to MrHoffman

Thanks MrHoffman,

I'm running the sysdiagnose command you suggested and don't get the previous error 🙏.

Isn't the EtreCheck utility just for OS problems, not Xcode specific problems? I'm sceptical about downloading it.

I'd prefer wait until I get feedback about whether or not I may delete the Xcode. caches.


PS: I haven't installed my SwiftUI App on the MacBook, only on an iPad. So I guess there's nothing to delete on my MacBook in that respect.



Clean Xcode install - how?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.