📝 MacOS签名

下载根证书 #

https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer

导入根证书 #

sudo security import ~/Downloads/DeveloperIDG2CA.cer \
-k /Library/Keychains/System.keychain \
-T /usr/bin/codesign \
-T /usr/bin/security \
-T /usr/bin/productbuild

查看和清理特殊属性 #

xattr -lr xxx.app
xattr -cr xxx.app

签发APP #

codesign --deep --force --verbose --sign "xxxx" xxx.app

验证签名 #

 spctl --assess --type execute --verbose=4 xxx.app

参考文档 #

https://testerhome.com/topics/33338

https://www.apple.com/certificateauthority/

https://www.jianshu.com/p/f420649fba42