Code Sign Error in macOS Sierra Xcode 8.3.3

这是iOS 10, macOS Sierra, watchOS 3, 和 tvOS 10带来的安全策略更新。代码签名不再允许应用程序包中的任何文件具有包含资源分叉或查找信息的扩展属性。

通过如下命令行,可以查看那些文件导致了这些问题:

$ xattr -lr <path_to_app_bundle>

解决这一问题的方案大致有三个:

  1. 删除App的资源文件中所有扩展属性

xattr -cr <path_to_app_bundle>

  2. 查找带有finder信息的文件,定向删除

ls -alR@ . > kundapura.txt

  找出com.apple.FinderInfo文件,定向删除扩展属性

xattr -c <filename>

  3. 定向文件类型,删除扩展属性

  find . -type f -name '*.jpeg' -exec xattr -c {} ;
  find . -type f -name '*.jpg' -exec xattr -c {} ;
  find . -type f -name '*.png' -exec xattr -c {} ;
  find . -type f -name '*.json' -exec xattr -c {} ;
原文地址:https://www.cnblogs.com/helmsyy/p/7615690.html