Xcode编译时builtin-copy失败
原因是有文件存在extended attributes,应该是Xcode命令行的一个bug。
解决方法:去除扩展属性@
1. 为什么会有这个@ ?
Headers andyliu$ ls -l
total 32
-rw-r--r--@ 1 andyliu staff 114 Oct 11 19:23 NodeMobile.h
-rw-r--r-- 1 andyliu staff 114 Oct 11 19:22 NodeMobile.x
-rw-r--r-- 1 andyliu staff 114 Oct 11 19:23 NodeMobile.x2
-rw-r--r--@ 1 andyliu staff 114 Oct 11 19:16 NodeMobile.xx
打印某个文件的扩展属性:
xattr App.docx
com.apple.FinderInfo
com.apple.lastuseddate#PS
com.apple.metadata:kMDLabel_7tid2fntzxfoopva5vyhyi2omq
com.apple.quarantine
这个扩展属性是MacOS增加一些额外信息,跟权限没有任何关系。
典型的是Finder,Spotlight等为了快速索引和关联时建立的信息。
参考这篇文章
2. 如何去除?(去除导致增加扩展属性的条件)
-
从spotlight移除
CMD+空格调出Spotlight自己,输入spotlight打开其配置页面,切换到Privacy页面,加入需要禁止的目录。
- 调出Activity Monitor,找到Finder进程,杀死它。
参考 (不一定有效的方法)
- https://apple.stackexchange.com/questions/87313/how-to-remove-xattr-com-apple-quarantine-from-all-webarchive-files-with-that-ex