user1974342
user1974342

Reputation: 51

Stop Xcode from memorize my previous opened projects

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.

Upvotes: 5

Views: 1214

Answers (3)

Durul Dalkanat
Durul Dalkanat

Reputation: 7415

For Xcode Version 6.3 (6D570)

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

Upvotes: 1

Seán Labastille
Seán Labastille

Reputation: 712

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)

Upvotes: 4

bibo bode
bibo bode

Reputation: 1150

System Preferences > General > Close windows when quitting an application

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

Upvotes: 2

Related Questions