I am getting following error when I try to edit any file in my project.
ASSERTION FAILURE in /SourceCache/IDEFoundation/IDEFoundation-943/Framework/Classes/
This is solved now. This was due to missing repository in XCode. I had to go to Organizer -> Repositories and press + button in bottom left corner to add repository. After which my project is compiling very well. Thanks Horst for your effort though.
Read-only source/plist/project files had been the root cause for the same problem with my Xcode. You may just verify that all files in your project folder are writable.