iOS企业帐号对ipa重新签名流程

  • Post author:
  • Post category:其他



将ipa应用重新签名流程如下:

1.企业开发$299美金帐户

2.登录

https://developer.apple.com



3.创建certificates证书,并安装. 通过钥匙串得到证书名称:

“iPhone Distribution:xxxxxx,Inc.”











4.创建Distribution, In House 的 provisioning。并下载下来命名为

inhouse.mobileprovision

, 并得到对应的App ID标识,  eg:

5SL94PMG3.com.xxxx.xxx











5.解压ipa得到Playload目录, unzip demo.ipa

6.删除Playload/demo.app/_CodeSignature

7.替换描述文件,

cp inhouse.mobileprovision Payload/demo.app/embedded.mobileprovision


8.准备

Entitlements.plist

文件,内容如下:

<?xml version=”1.0″ encoding=”UTF-8″?>

<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>

<plist version=”1.0″>

<dict>



<key>application-identifier</key>



<string>

5SL94KPMG3.com.xxxx.xxx

</string>



<key>com.apple.developer.team-identifier</key>



<string>

5SL94KPMG3

</string>



<key>get-task-allow</key>



<false/>



<key>keychain-access-groups</key>



<array>



<string>

5SL94KPMG3.com.xxxx.xxx

</string>



</array>

</dict>

</plist>

其中application-identifier的值要对应mobileprovision里的App ID标识. eg.

5SL94KPMG3.com.xxxx.xxx


com.apple.developer.team-identifier, 则要填写 App ID. eg.

5SL94PMG3


keychain-access-groups, 数组的第一项,建议与 application-identifier 一样。

9.重新签名ipa

codesign -f -s “iPhone Distribution: xxxxx,Inc.” –entitlements Entitlements.plist Payload/demo.app/

其中 -s 后面带的名称是 certificates文件的证书名称(参照第3点)


10.压缩成ipa包,

zip -r new_demo.ipa Payload











版权声明:本文为caojengineer原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。