Tech Reflect
  • Home
  • About This Site
  • Contact me
  • Search Icon
Xcode nuclear option

Xcode nuclear option

2017-08-17

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"

geeky, macOS tips

Post navigation

NEXT
Shell aliases
PREVIOUS
Set up timed or recurring scripts
Comments are closed.

Get Monthly Updates

Recent Posts

  • Inserting random email sigs in Mail on iOS
  • Keep Instagram open to finish posting…
  • How I predicted the rise of Twitter, barely used it, and amassed 35,000 followers
  • Apple Books 2022, in pictures
  • Killing one bird with two-and-a-half stones in Mac OS X Mail

Categories

  • analog (1)
  • apple career (12)
  • apple inside (19)
  • apple stories (20)
  • bertrand serlet (3)
  • bugs (3)
  • essays (15)
  • geeky (21)
  • interviews (4)
  • iOS tips (4)
  • Mac OS X (7)
  • macOS tips (36)
  • personal (8)
  • predictions (1)
  • products (5)
  • prototypes (6)
  • scott forstall (7)
  • scripting (2)
  • siri (2)
  • steve jobs (16)
  • tim cook (1)
  • workplace (15)

Get Monthly Updates

About cricket


Me with Guiness the owl

25 years in tech. I like to write manifestos. I like to offer interesting tips. I like making fun of things. Everyone copes differently.

My Other Blogs

  • Free Range Parrots
  • Plucky Tree (personal)
© 2025   All Rights Reserved.