(Will answer my own question, for future self and others. Feel free to contribute!)
I want to see the Xcode UI as if I’d never run it before. (To check an Xcode tutorial I'm making.) Basically, I want to "factory reset" Xcode.
Bonus points if I can easily swap to my normal Xcode settings.
(ver: Xcode 13.3.1)
Depends what you want to reset:
- To reset Xcode -> Preferences…, and most other Xcode UI settings:
- Delete your Xcode preferences:
- In Terminal, enter
defaults delete -app xcode
- That resets
~/Library/Preferences/com.apple.dt.Xcode.plist
- In Terminal, enter
- There's also these preferences files (but I didn't have to change them):
- Delete your Xcode preferences:
~/Library/Preferences/com.apple.preferences.extensions.XcodeSourceEditor.plist
/Library/Preferences/com.apple.dt.Xcode.plist
-
To reset Xcode -> Preferences… -> Accounts
- Delete your Xcode cache:
~/Library/Caches/com.apple.dt.Xcode
- My cache also had
com.apple.dt.Xcode.sourcecontrol.Git
, which I deleted, but didn't see any change.
- Delete your Xcode cache:
-
To reset Xcode -> Preferences… -> Source Control -> Git
- Delete your Git config:
~/.gitconfig
- You can do this in the Finder, but first you have to toggle hidden files (press command-shift-.)
- Delete your Git config:
-
You can also delete
~/Library/MobileDevice
and~/Library/Developer
, though I didn't have to for what I wanted.- The question is about making the UI look like it does on first launch. If you're trying to clean up Xcode because something doesn't seem to be running right, some other things to try are:
- Quit Xcode and relaunch
- Clean the project
- Restart the Mac
- Delete derived data
- The question is about making the UI look like it does on first launch. If you're trying to clean up Xcode because something doesn't seem to be running right, some other things to try are:
If you want to "factory reset" Xcode but later return to custom settings, first backup the relevant files so you can copy them back:
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/.gitconfig
I'm not sure the cache file will still work, so you may have to re-enter account info.
An answer here also suggests copying:
~/Library/Developer/Xcode/UserData/CodeSnippets
~/Library/Developer/Xcode/UserData/FontAndColorThemes
~/Library/Developer/Xcode/UserData/KeyBindings
~/Library/Developer/Xcode/Templates
~/Library/MobileDevice/Provisioning Profiles
Hope that helps!