一、解压ipa包
1、unzip -q/Users/xiaoconglin/Desktop/packbck/RHDemo_H5.ipa -d /Users/xiaoconglin/Desktop/packbck/resign</font>
二、列出所有开发者证书文件
1、security find-identity -v -p codesigning
三、生成entitlements.plist文件
1、security cms -D -i /Users/xiaoconglin/Desktop/packbck/wcyxadhoc.mobileprovision > /Users/xiaoconglin/Desktop/packbck/resign/profile.plist
2、/usr/libexec/PlistBuddy -x -c 'Print :Entitlements' /Users/xiaoconglin/Desktop/packbck/resign/profile.plist > /Users/xiaoconglin/Desktop/packbck/resign/entitlements.plist
四、把准备好的开发者证书描述文件复制到XX.app文件夹下
1、cp /Users/xiaoconglin/Desktop/packbck/wcyxadhoc.mobileprovision /Users/xiaoconglin/Desktop/packbck/resign/Payload/大天使之剑.app/embedded.mobileprovision
五、修改包Info.plist中的Bundle Identifier与配置文件中的Bundle Identifier保持一致
1、查看entitlements.plist,获取application-identifier 的值作为app的新bundleidentify
cat /Users/xiaoconglin/Downloads/重签名包/packResign/app-plist/entitlements.plist
2、/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier com.xy.xxxx" /Users/xiaoconglin/Desktop/packbck/resign/Payload/大天使之剑.app/Info.plist
六、移除已经签名的_CodeSignature 包括framework里面的
1、rm -rf Payload/XX.app/_CodeSignature
2、rm -rf Payload/XX.app/framework/_CodeSignature
七、重签名framework,有多少个framewrok 就重签多少
1、/usr/bin/codesign --force --sign 6D9B32BC1A4F36D6E8BD63C05B4B6116775A0D2A --entitlements /Users/xiaoconglin/Desktop/packbck/resign/entitlements.plist /Users/xiaoconglin/Desktop/packbck/resign/Payload/大天使之剑.app/Frameworks/Translate.framework
八、重签名app
1、/usr/bin/codesign --force --sign 6D9B32BC1A4F36D6E8BD63C05B4B6116775A0D2A --entitlements /Users/xiaoconglin/Desktop/packbck/resign/entitlements.plist /Users/xiaoconglin/Desktop/packbck/resign/Payload/大天使之剑.app/大天使之剑
九、压缩
1、cd /Users/xiaoconglin/Desktop/packbck/resign
2、zip -qr seg.ipa Payload/
网友评论