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進程,殺死它。