总结了一波iOS出包相关的命令行,内容如下:
security unlock-keychain -p `mac_password` /Users/xx/Library/Keychains/login.keychain
mac_password 表示mac电脑开机密码
security import `p12_filepath` -k /Users/xx/Library/Keychains/login.keychain -P `p12_password` -T /usr/bin/codesign
p12_filepath 表示p12文件路径
p12_password 表示p12文件密码
openssl pkcs12 -password pass:"p12_password" -in `p12_filepath` -nodes 2>&1 | grep friendlyName | head -n 2 | sed 's/friendlyName://g' | grep -o "[^ ]\+\( \+[^ ]\+\)*"
p12_filepath 表示p12文件路径
p12_password 表示p12文件密码
security find-identity -v -p codesigning
搜索 REVOKED 关键字来判断证书是否被撤销
$ security find-identity -v -p codesigning | grep REVOKED
12) BC94E9400C1F7A96101475CE6D3603C8FF5C561F "iPhone Developer: Guo Qun Wan (5N6XPS8SJT)" (CSSMERR_TP_CERT_REVOKED)
security find-identity -v -p codesigning | cut -d \" -f2
codesign -s ‘iPhone Developer: xxxxx’ **.app
codesign -f -s ‘iPhone Developer:xxxx’ **.app
codesign -vv -d **.app
codisign --verify **.app
如果未被破坏,输出为空;否则输出错误原因
security cms -D -i example.mobileprovision