0%

iOS OTA 搭建

反馈请联系hertz@hertzwang.com,谢谢

搭建OTA

前言:我使用阿里的ECS,万网购买的域名,赛门铁克签发的证书,使用Nginx做的反向代理及Web服务

目录

-> xxx.ipa
-> manifest.plist
-> xxx.crt
-> index.html
-> images
    -> 57x57.png
    -> 512x512.png

xxx.ipa

打包略

manifest.plist

应用信息文件,包含bundle identifier、ersion、ipa文件路径、预览图等信息

  • 打包时勾选Include manifest for over-the-air installation

  • 手动创建文件,内容如下:

      <?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>items</key>
          <array>
              <dict>
                  <key>assets</key>
                  <array>
                      <dict>
                          <key>kind</key>
                          <string>software-package</string>
                          <key>url</key>
                          <string>https://DomainOrIP/path/xxx.ipa</string>
                      </dict>
                      <dict>
                          <key>kind</key>
                          <string>display-image</string>
                          <key>url</key>
                          <string>https://DomainOrIP/path/image/57x57.png</string>
                      </dict>
                      <dict>
                          <key>kind</key>
                          <string>full-size-image</string>
                          <key>url</key>
                          <string>https:/DomainOrIP/path/image/512x512.png</string>
                      </dict>
                  </array>
                  <key>metadata</key>
                  <dict>
                      <key>bundle-identifier</key>
                      <string>AppBundleIdentifier</string>
                      <key>bundle-version</key>
                      <string>AppBundleVersion</string>
                      <key>kind</key>
                      <string>software</string>
                      <key>title</key>
                      <string>AppName</string>
                  </dict>
              </dict>
          </array>
      </dict>
      </plist>
    

xxx.crt

用于服务器https配置和手机安装证书

  • 使用已有证书

    • pemcrt openssl x509 -outform der -in your-cert.pem -out your-cert.crt
    • 其它转crt参考文章
  • 建新证书

index.html

引导安装证书和安装应用

  • 证书连接:https://DomainOrIP/path/xxx.crt
  • 安装应用:itms-services://?action=download-manifest&url=https://DomainOrIP/path/manifest.plist