1,解密二进制文件
2,替换embedded.mobileprovision
3,修改Bundle ID
$ /usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier com.xxx.xxx" ./Payload/iosapp.app/Info.plist
4,生成mobileprovision证书对应的entitlements文件
$ security cms -D -i "./Payload/iosapp.app/embedded.mobileprovision" > t_entitlements_full.plist
$ /usr/libexec/PlistBuddy -x -c 'Print:Entitlements' t_entitlements_full.plist > t_entitlements.plist
5,给framework重签名
codesign -f -s "iPhone Distribution: abc" /Users/if you/Desktop/Payload/xxx.app/Frameworks/Framework.framework
6,给ipa重签名,将Certificate和entitlements作为参数,传递给codesign签名
$ codesign -f -s "iPhone Distribution: abc" /Users/if you/Desktop/Payload/xxx.app/ --entitlements t_entitlements.plist
网友评论