苹果ipa包重签企业证书
1. 需要有有效企业证书和描述文件(xxx.mobileprovision)及对应的Bundle identifier
2.将ipa包的文件后缀改为zip格式,在解压!
3.打开Payload文件,右击选择显示包内容
4.找到一个叫embedded.mobileprovision文件,用我们自己的描述文件进行替换(注意:自己的描述文件名字一定要改成embedded.mobileprovision)
5.使用embedded.mobileprovision制作entitlements.plist 文件,打开终端
xianghaodeMacBook-Pro:~ Johnhao$ security cms -D -i /Users/Johnhao/Downloads/Payload/LotteryProject.app/embedded.mobileprovision > /Users/Johnhao/Downloads/Payload/LotteryProject.app/entitlements_full.plist
xianghaodeMacBook-Pro:~ Johnhao$ /usr/libexec/PlistBuddy -x -c 'Print:Entitlements' /Users/Johnhao/Downloads/Payload/LotteryProject.app/entitlements_full.plist > /Users/Johnhao/Downloads/Payload/LotteryProject.app/entitlements.plist
security cms -D -i embedded.mobileprovision文件路径 > 生成entitlements_full.plist文件的路径
/usr/libexec/PlistBuddy -x -c 'Print:Entitlements' entitlements_full.plist文件的路径 > 生成entitlements.plist文件的路径
6.完成以上步骤后,打开info.plist文件,更改我们自己描述文件对应的bundle id
7.重签,安装一下步骤执行,出现replacing existing signature说明你成功了!就可以发布到蒲公英或者fir.im了。
xianghaodeMacBook-Pro:~ Johnhao$ /usr/bin/codesign --continue -f -s "iPhone Distribution: Xiaofu Ecommerce (Beijing) Co., Ltd." --entitlements "/Users/Johnhao/Downloads/Payload/LotteryProject.app/entitlements.plist" "/Users/Johnhao/Downloads/Payload/LotteryProject.app"
/Users/Johnhao/Downloads/Payload/LotteryProject.app: replacing existing signature