跳到主要内容
版本:1.10.x

应用程序部署

部署应用程序


为了将应用了AppGuard SDK的IPA提交到App Store并进行分发,最终需要在AppGuard Manager中应用AppGuard Sign。为了确保IPA篡改检测功能正常工作,AppGuard Sign是必需的。

危险

如果不在IPA上应用AppGuard Sign,应用程序可能会因安全策略而异常终止。

应用AppGuard Sign

在AppGuard Manager中选择**[Sign Register],然后点击[Sign Register Application]**按钮。 iOS


选择要在AppGuard Manager中注册的IPA文件,并将其拖放到**[IOS Sign Register]**窗口中。 iOS


IPA文件上传完成后,点击**[Sign Register]**按钮。 iOS


签名操作完成后,点击窗口中的关闭按钮。 iOS


注册操作完成后,可以查看注册的内容,并点击Down按钮下载已签名的IPA。 iOS

IPA代码签名及分发

应用了AppGuard Sign的IPA需要使用客户公司的分发证书进行代码签名。我们提供了iparesign.sh脚本,以便客户公司能够轻松进行代码签名。

  1. 创建一个用于代码签名的文件夹,并复制已签名的IPA文件和iparesign.sh文件。 iOS

  2. 打开终端,移动到用于代码签名的文件夹。输入以下命令进行代码签名。

    $ cd [iparesign.sh 位置路径]
    $ ./iparesign.sh --ipa [/path/to/your_app_appguarded.ipa]
  3. 代码签名过程中会显示分步骤日志。确认是否如以下日志所示正常执行。

    1. Check if an ipa file exists
    [success] "QATestGame_appguarded.ipa"

    2. unzip ipa package
    [success] "QATestGame_appguarded.ipa"

    . . .

    10. codesign the app
    /Users/inca/Downloads/iparesign/resigncompleted/Payload/xCode_1402_TestApp.app: replacing existing signature
    [success] codesign the app

    11. zip the package
    [success] "/Users/inca/Downloads/iparesign/resigncompleted/QATestGame_appguarded_resigned.ipa"
    (this ipa file has to upload at appstoreconnect.apple.com)
    ============= resign completed =============
    inca@c2211-001Macmini iparesign %
  4. 如果iparesign.sh正常执行,将生成已应用代码签名的resigncompleted/your_app_appguarded_resigned.ipa文件。可以使用[Transporter]将此文件提交到App Store。

iparesign.sh脚本详细说明

iparesign.sh是一个Shell脚本,提供了使用客户公司的证书轻松对IPA文件进行代码签名的功能。

iparesign.sh --ipa path [--entitlements path] [--profile path] [--identity "Your Signing Identity"] [--out path]
选项说明
--ipa指定要进行代码签名的IPA文件路径。
--entitlements指定entitlements文件的路径。
--profile指定用于代码签名的provisioning profile的路径。
--identity指定用于代码签名的Signing Identity。
--out指定已完成签名的IPA文件的输出路径。
警告

要使用**iparesign.sh**进行代码签名,使用的PC上必须安装有分发证书。