Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

xcode - myProject is locked for editing and you may not be able to save your changes?

I get the following error messages when I moved my code from my laptop to my Mac Mini and opened it over there:

myProject is locked for editing and you may not be able to save your changes?


myProject is currently locked because you are not the owner of the file and do not have write permission.


The file "xxx.xcuserdatad" could not be unlocked. Could not add write permission to the file because you do not own it. Try modifying the permission of the file in the Finder or Terminal.


I did a search with Finder: What came up was a file called UserInterfaceState.xcuserstate inside of xxx.xcuserdatad... GetInfo showed the file not to be locked.

However looking at the path(from GetInfo) showed the file to be within "xxx.xcodeproj" and further within "project.xcworkspace/xcuserdata/xxx.xcuserdatad"

I can't find this anywhere, and I don't know how to use my project on another computer.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Go to the Folder in Finder where the xcode project is and right click -> Get info. The permissions and the bottom should be set to read/write and in my case they were. The trick is to click the settings icon at the bottom and select "Apply to enclosed items". The chmod method shown above doesn't change the permissions of the contents within the folder.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...