Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Don't want Xcode to second guess you so much?</p> <p>I found an Xcode specific fix on Daniel Tull's blog, he credited it to "Pete". The link to his blog below describes doing the same task from the Finder.</p> <p>XCode stores its prior window state here when it quits:</p> <pre><code>~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState </code></pre> <p>If you empty that folder and lock it, when you quit Xcode, it cannot write into the folder, but will simply quit gracefully. Subsequently, if you start Xcode directly, it opens nothing; Double clicking on a project file will open ONLY that project. It's exactly the behavior i want, and other apps will still obey the 'Restore windows when quitting and re-opening apps' General Preference.</p> <p>I assume this trick would work selectively for other apps which use the "Saved Application State" folder, though some might complain if they can't write their state on the way out. You can probably accomplish this using unix permissions as well, but I only tested it using HFS locking on Lion with Xcode432.</p> <p>Here are shell commands to this all in one go, set to be verbose and timid while doing so. You can just paste the whole block into a command terminal. This should work fine even if Xcode is running, but since Xcode4 swoons away on the flimsiest excuse, it's probably better to quit it first.</p> <pre><code>#---------- #show the current contents: ls -al ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState/* #just in case, unlock the folder, using the HFS-specific lock mechanism: chflags -vv nouchg ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState #Empty the folder, asking for permission on each file (type 'y', then &lt;enter&gt; for each) rm -ivd ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState/* # Finally lock the folder so Xcode can't save its window state in the future: chflags -vv uchg ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState # ---------- </code></pre> <p><a href="http://danieltull.co.uk/blog/2011/11/07/preventing-xcode-4-on-lion-reopening-windows/" rel="noreferrer">http://danieltull.co.uk/blog/2011/11/07/preventing-xcode-4-on-lion-reopening-windows/</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload