星空网 > 软件开发 > 操作系统

ipa如何通过网络进行安装

  苹果手机端应用,如果发布的到Appstore上,往往比较复杂,周期也比较长,Over-the-Air是Apple在 iOS4 中新加的一项技术,目的是让开发者能够脱离Appstore,实现从自己的服务器下载并安装iOS应用。简单地说,就是用户只需要在Safari中点开一条链接,就能直接在主界面中安装App。

  在高版本的IOS上,plist必须要部署到https服务器上,才能正常访问。下面用示例来介绍如何脱离AppStore来安装IPA应用。

1 xcode打包ipa(app.ipa)

并上传到可以公网访问网络上,例如 http://yourwebsite.com/ipa/app.ipa可以访问,如果是IIS服务器,那么需要配置mime类型支持.ipa下载,否则会提示错误。

ipa如何通过网络进行安装images/loading.gif' data-original="http://images2015.cnblogs.com/blog/76497/201608/76497-20160804144338747-1980898198.jpg" />

  1. 打开IIS服务管理器,找到服务器,右键-属性,打开IIS服务属性;
  2. 单击MIME类型下的“MIME类型”按钮,打开MIME类型设置窗口;
  3. 单击“新建”,建立新的MIME类型;

    扩展名是:.apk MIMI类型是:application/vnd.android.package-archive

    扩展名是:.ipa MIMI类型是:application/iphone


配置好后,IIS重启。配置成功再次访问网址,会提示下载:

ipa如何通过网络进行安装

2 编写plist文件

<??><!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>http://yourwebsite.com/ipa/app.ipa</string>        </dict>      </array>      <key>metadata</key>      <dict>        <key>bundle-identifier</key>        <string>com.aruistar.cmcapp</string>        <key>bundle-version</key>        <string>1.0</string>        <key>kind</key>        <string>software</string>        <key>title</key>        <string>cmcapp</string>      </dict>    </dict>  </array></dict></plist>

plist文件必须放到https服务上,自己没有架设,可以上传到github上进行处理。plist中注意<string>http://yourwebsite.com/ipa/app.ipa</string>的配置。

2 创建一个ipainstall.html的页面,代码如下:

 1 <!DOCTYPE html> 2 <html > 3 <head> 4   <title>ipa installed on the air</title> 5   <meta charset="UTF-8"> 6   <style type="text/css"> 7   body{ 8     padding: 0; 9     margin: 0;10 11   }12   table13   {14     width: 100%;15     border: solid 1px #999;16     border-collapse:collapse;17   }18   table tr,table td19   {20     21     border: solid 1px #999;22     border-collapse:collapse;23   }24 </style>25 </head>26 <body>27   <div style="font-size:70px; text-align:center; background-color:#999;height:160px;line-height:160px;">28    无线安装iOS应用29   </div>30   <div style="font-size:60px; text-align:center;">31   <table>32   <tr>33   <td>序号</td>34   <td>应用名称</td>35   <td>备注</td>36   </tr>37   <tr>38   <td>1</td>39   <td><a href="itms-services://?action=download-manifest&url=https://raw.githubusercontent.com/yourgithub/iosapp/master/manifest.plist">内部市场化</a></td>40   <td>IOS</td>41   </tr>42   <table>43   </div>44 </body>45 </html>

这里注意的是,itms-services://?action=download-manifest&url不是默认的github上的网址,必须是原始文件的地址,一般是raw.githubusercontent.com开头的。

这个网址,必须用苹果safari进行访问才能解析:

ipa如何通过网络进行安装

 

安装成功后,打开app即可操作了:

ipa如何通过网络进行安装

 




原标题:ipa如何通过网络进行安装

关键词:网络

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流