zoukankan      html  css  js  c++  java
  • 如何通过网页提供iOS应用下载

    有一些企业开发了应用,但是由于某些原因,不想在苹果的App store上发布。

    对于某些内测的游戏,使用了苹果私有Api的应用,或者企业内部的应用,本文可能会有帮助。

    首先,你需要在苹果的开发者网站上注册成为企业开发者。

    其次,通过开发者的控制中心,生成开发者证书及发布文件。

    第三,完成你的开发,并在Xcode中使用企业证书打包成ipa文件。

    这三部分在本文中不再赘述,熟悉的朋友应该很轻松就能解决。

    这时,你需要一台服务器,搭建一个web页面,并支持https协议(苹果从iOS7开始,只能支持https下载应用)。

    如果你没有服务器,那么也有方法可以解决,找一个第三方托管的网站放置后面我们提到的文件。

    然后,在web页面A上,可以设置一个Download按钮,触发以下代码:

    <script>
      window.location.href='itms-services://?action=download-manifest&url=https://www.你的域名.com/download.plist';
       
       
      </script>

    这里需要注意,download.plist文件所在的地址,必须要支持https协议。

    plist文件的内容如下:

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"

    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">

    <dict>

    <!-- array of downloads. -->

    <key>items</key>

    <array>

    <dict>

    <!-- an array of assets to download -->

    <key>assets</key>

    <array>

    <!-- software-package: the ipa to install. -->

    <dict>

    <!-- required. the asset kind. -->

    <key>kind</key>

    <string>software-package</string>

    <!-- required. the URL of the file to download. -->

    <key>url</key>

    <string>https://你的域名.com/文件名.ipa</string>

    </dict>

    <!-- display-image: the icon to display during download. -->

    <dict>

    <key>kind</key>

    <string>display-image</string>

    <!-- optional. icon needs shine effect applied. -->

    <key>needs-shine</key>

    <true/>

    <key>url</key>

    <string>icon地址(114*114)</string>

    </dict>

    <!-- full-size-image: the large 512��512 icon used by iTunes. -->

    <dict>

    <key>kind</key>

    <string>full-size-image</string>

    <key>needs-shine</key>

    <true/>

    <key>url</key>

    <string>icon地址(512*512)</string>

    </dict>

    </array><key>metadata</key>

    <dict>

    <!-- required -->

    <key>bundle-identifier</key>

    <string>你的ipa的包名</string>

    <!-- optional (software only) -->

    <key>bundle-version</key>

    <string>版本号</string>

    <!-- required. the download kind. -->

    <key>kind</key>

    <string>software</string>

    <!-- optional. displayed during download; -->

    <!-- typically company name -->

    <key>subtitle</key>

    <string>小标题</string>

    <!-- required. the title to display during the download. -->

    <key>title</key>

    <string>标题</string>

    </dict>

    </dict>

    </array>

    </dict>

    </plist>

    根据你的情况进行内容的调整。

    然后就可以通过访问网页A进行下载了。

    注意iOS9以后,企业证书打包的应用程序,安装成功后,需要在设置->通用->描述文件 中找到相应的描述文件,点击“信任”以后,才能正常打开应用。

    本文写得比较简略,如果在实施过程中有任何问题,亲,可以直接联系我 zengyanzhi@gmail.com。知无不言。

  • 相关阅读:
    腾讯2014年实习生招聘笔试面试经历
    Unity MVC框架 StrangeIoC
    Android入门第八篇之GridView(九宫图)
    拓扑排序
    C:打印菱形(自己的方法)
    JSP中Session的使用
    继承Application实现Android数据共享
    使用Java高速实现进度条
    首次启动优美新手指引tip
    递归算法
  • 原文地址:https://www.cnblogs.com/zengyanzhi/p/4838143.html
Copyright © 2011-2022 走看看