XCode: The document: "<document name>" could not be saved. The file has been changed by another application"
xcode4
Solution
You will get this happening when
1) There are locally unsaved modifications (the navigator icon will be shaded)
2) AND something else has changed the file outside of Xcode. For me this occurs when I do an external update from `svn` on the command line or via `Versions`
What do you have that is modifying and saving the file outside of Xcode? Anything?
Check your source control (if any) and figure out if something you are doing is causing the conditions to be met.
Problem
Since starting to use XCode 4.2 I've more-or-less routinely had the error: with various substitutions for the filename. This is normally when Xcode is doing an autosave, so it happens seemingly at random. I generally click "Save Anyway" and my recent edits are then preserved, although there is a significant probability that Xcode will then hang. I don't typically lose much when it hangs, other than a minute to shoot it and get it to restart, but still... I don't open any of these files in any application except XCode. I have not been able to figure out the pattern, although it may have to do with popping back and forth between files. The last time I noticed it, I also noticed that the previous round of edits to that file hadn't taken. So some other editor had not saved the file. Enough preamble: here's the question: Are others running into this? Has anyone narrowed down what causes it? Is there a setting I can change to prevent it? Is there something I can change in my behaviour?