Tech Reflect

Tech Reflect

Share this post

Tech Reflect
Tech Reflect
Xcode nuclear option

Xcode nuclear option

Chris Hynes - cricket's avatar
Chris Hynes - cricket
Aug 17, 2017
∙ Paid

Share this post

Tech Reflect
Tech Reflect
Xcode nuclear option
Share

If you’ve ever had a bizarre problem in Xcode and you’ve given up hope, this post is for you. Some frustrating things you might see:

  • Breakpoints stop working

  • A framework or library can’t be found that the compiler found moments ago

  • Symbols in linked frameworks are no longer found

  • This is not a comprehensive list.

I wrote this script a decade ago and in this frustrating moments, I run it, and go get a refreshing beverage while my computer reboots. It’s kind of unbelievable how often this has saved me. Maybe it will help you at least once in your life.

Note: Read the script first as it deletes your caches and DerivedData folder. It shouldn’t be a problem but you should be aware what it’s doing.

#!/bin/zsh

rm -rf ~/Library/Developer/Xcode/DerivedData 

#edit this to point to your DerivedData folder
rm -rf ~/Library/Caches/*Xcode*

sudo find /var/folders -iname xcode -exec mv \{\} \{\}.saved \;
echo "Reboot is recommended!\n"

Keep reading with a 7-day free trial

Subscribe to Tech Reflect to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Christopher Hynes
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share