Tired of having Xcode (3.x and later) prompt to you “Save Changes To ‘index.html’ before building?” when index.html is open in TextWrangler/BBedit and so on and has _nothing_ to do with the current iphone project you are working on? Read on for the answer!
The easy way is to just set the “For Unsaved Files” setting in the Building section of the Xcode preferences to not prompt you, but this defeats the prompt for files IN Xcode that you maybe DO want to be prompted to save.
In Xcode there was support for “external editors”. In Xcode 3.x I don’t see the UI for configuring these any longer so I’m not sure if it still exists or not. In any case, this functionality is the cause of the annoying prompts to save totally unrelated files other editors.
The list of external editors is in the com.apple.Xcode.plist file in your ~/Library/Preferences/ folder and removing that list “solves” the problem. There may be better ways to solve it, but this is the one I found that works.
The two keys are XCExternalEditorList, and PBXExternalEditorList, however in my test only the second one had to be removed to make these annoying prompts go away; in the terminal:
$ defaults delete com.apple.Xcode PBXExternalEditorList
Of course Xcode shouldn’t be running when you do that or it’ll either ignore you or just rewrite them into the file.
*** Note that you probably DO want Interface Builder in the list of external editors in XCExternalEditorList (the newer key), so if you want to remove entries from that one, do them individually instead of removing the entire block of entries ***