5

This really drives me bunker! At any time, I work on multiple projects. When I quit Xcode, the next time I open Xcode, all my projects from the day before open automatically one by one.

Often I end up editing the wrong file, AHHHHHHHHHHH!! The only way I could stop this behavior is by closing all projects before quitting Xcode, go to Open Recent, select Clear Menu, and go to Organizer to delete all projects one by one. There must be a easier way to stop Xcode from "memorizing" my projects.

I had asked Apple numerous times, but Apple people kept telling me to go to Xcode Preferences to turn it off and often they seem to have confused it with the Mountain Lion's Reopen Preferences which I had it turned off. I found no such option in my Xcode 4.5.2 and Apple people insist it is there.

Does any of you have that option on your Xcode 4.5.2? Or did Apple single me out to omit that option, just to piss me off? Mostly importantly, how can I stop this nuisance? When I restart the Xcode, I want a clean start >:|

Thanks.

Chait
  • 1,052
  • 2
  • 18
  • 30

3 Answers3

4

You can modify the setting whether an application reloads its windows as shown in this question.

Xcode's identifier is com.apple.dt.Xcode so the command for changing the default is

defaults write com.apple.dt.Xcode NSQuitAlwaysKeepsWindows -bool NO

In my testing it can take one or two re-launches to stick. If you just want to close all windows once you can also use Quit and Close All Windows (⌘⌥Q)

Community
  • 1
  • 1
Seán Labastille
  • 712
  • 7
  • 17
  • I have tried this before when I Googled this issue awhile back, it still doesn't work for me. And On the contrary,"If you just want to close all windows once you can also use Quit and Close All Windows (⌘⌥Q)" I just want Xcode not to open my previous projects. – user1974342 Jan 13 '13 at 18:18
2

System Preferences > General > Close windows when quitting an application

Here you can find a checkbox to disable the "feature". Also, see this similar question.

Community
  • 1
  • 1
bibo bode
  • 1,150
  • 1
  • 10
  • 17
  • This is precisely the kind of answer I got from Apple, I have already said a million times that I have it disabled. – user1974342 Jan 13 '13 at 18:23
1

For Xcode Version 6.3 (6D570)

Delete this directory ~/Library/Saved Application State/com.apple.dt.Xcode.savedState

Durul Dalkanat
  • 7,266
  • 4
  • 35
  • 36