自建ipa分发平台

自建ipa分发平台

准备一台支持https访问的服务器, 因为我们要在具体目录下上传 app.png, app.plist, app.ipa三个文件, 届时会生成三个访问地址, 比如:

https://***/***.png
https://***/***.ipa
https://***/***.plist

png和ipa这个不用多说, 主要说下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>items</key>
  <array>
    <dict>
      <key>assets</key>
      <array>
        <dict>
          <key>kind</key>
          <string>software-package</string>
          <key>url</key>
          <string>https://xxx.xxx.com/download/xxx.ipa</string>
        </dict>
        <dict>
          <key>kind</key>
          <string>display-image</string>
          <key>needs-shine</key>
          <true/>
          <key>url</key>
          <string>https://xxx.xxx.com/img/xxx.png</string>
        </dict>
      </array>
      <key>metadata</key>
      <dict>
        <key>bundle-identifier</key>
        <string>io.xxx.xxx</string>
        <key>bundle-version</key>
        <string>1.0</string>
        <key>kind</key>
        <string>software</string>
        <key>subtitle</key>
        <string>xxx</string>
        <key>title</key>
        <string>xxx</string>
      </dict>
    </dict>
  </array>
</dict>
</plist>

需要修改software-package display-image bundle-identifier subtitle title
software-package 使用 https://xxxx.xxxx.com/xxx.ipa 的地址

配置地址

在下载页面配置apk下载地址以及plist地址,这里需要注意,由于iOS 的安全机制,plist文件需要使用https地址,否则会导致ipa 文件无法正常安装。
完整安装app的地址应该是itms-services://?action=download-manifest&url=https://****/***.plist, 那这个地址去生成二维码之类的, 给其他手机去安装

总结

主要配置的其实就是iOS 的下载所需的plist文件,以及https访问,如果这两个地方出错,会导致ipa 下载正常,确无法正常安装。

posted @ 2021-02-23 22:17  CleverPeng  阅读(781)  评论(0)    收藏  举报