krzyzanowskim / Natalie

Natalie - Storyboard Code Generator (for Swift)
http://blog.krzyzanowskim.com/2015/04/15/natalie-storyboard-code-generator/
MIT License
1.17k stars 74 forks source link

Operation not permitted #123

Closed aabanaag closed 6 years ago

aabanaag commented 6 years ago

I always get this error whenever I try to checkout other branch in Xcode.

could not remove '/Users/account/Documents/Code/App/Company/project-app/PROJ/Storyboards.swift': Operation not permitted (-1)

Any ideas?

phimage commented 6 years ago

do in terminal an ls -s '/Users/account/Documents/Code/App/Company/project-app/PROJ/Storyboards.swift'

and check the file right

do a chmod if necessary

--

or maybe the file do no exist

aabanaag commented 6 years ago

I did a chmod onto the Storyboards.swift file but with no luck still has operation not permitted whenever I switch onto another branch. I have to delete the file first before I can switch the generate it again. Also I'm seeing a lock icon lower left of the file icon.

krzyzanowskim commented 6 years ago

The file is locked by the Xcode script

aabanaag commented 6 years ago

I have to delete the Storyboards.swift (locked) file then do a revert in xcode after that I can switch branch.

krzyzanowskim commented 6 years ago

Modify the script to not lock the file

aabanaag commented 6 years ago

image

Sorry, but I just copied the script from the readme. how would I modify the script to not lock the file?

krzyzanowskim commented 6 years ago

Comment out lines with "chflags"

aabanaag commented 6 years ago

Thanks.