Search code examples
xcodefilepermissionspermission-deniedread-write

why wont Xcode save my files?


I have been working on an app in XCode for a while now and added a new file to the app today. When I went to save it, XCode came up with an alert saying that I did not have permission to save the file and to check in the info part of the file. I did, but the file says that it is read & write so there should be no reason why this happened. I then tried deleting it and creating it again but it again said the same thing. I then deleted it and started working on the mainViewController file and the same thing came up again! I did not do anything to the computer or the files yesterday except for I added some code in them that seemed to have worked just fine. What can I do to fix this?

P.S.: This happens with all new files I create - not just the .m, .h, & .xib file.


Solution

  • Check the permissions on the directory where you're trying to save the file. Also, check the permissions on the files in the project bundle.