1.改后缀为zip并解压,里面至少有一个Payload文件夹
2.替换你需要替换的东西,并将. mobileprovision文件重命名为embedded.mobileprovision替换掉Payload/XXX.app/embedded.mobileprovision
3.cd到解压出来的并有Payload文件夹的目录
4.使用以下命令获取entitlements信息并用打印出的内容创建entitlements.plist文件
codesign -d --entitlements - Payload/XXX.app
5.重签名,注意在对动态framework进行签名的时候adhoc与dis包的签名方式不同,如果对dis包使用了adhoc的签名方式,上传时会报错:
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature
contains code signing entitlements that are not supported on iOS.
Specifically, value 'XXXXXXXXXX.COM.X.Y.Z.A' for key 'application-identifier' in
'Payload/APPNAME.app/Frameworks/FRAMEWORKNAME.framework/FRAMEWORKNAME' is not supported.
This value should be a string starting with your TEAMID, followed by a dot '.', followed by
the bundle identifier."
先对framework签名:
#adhoc:
codesign -f -s "iPhone Distribution: XXX" --entitlements entitlements.plist Payload/XXX.app/Frameworks/SDK.framework
#dis:
codesign -f -s "iPhone Distribution: XXX" entitlements.plist Payload/XXX.app/Frameworks/SDK.framework
再对整个包签名:
codesign -f -s "iPhone Distribution: XXX" --entitlements entitlements.plist Payload/XXX.app
PS: 签名时候使用的证书名称可通过钥匙串双击对应证书后在下面的常用名称里复制,或者通过命令查看: 前提是你已经双击安装了.p12
security find-identity

网友评论