用items-service协议通过网站发布iOS应用

Monday, November 5, 2012

苹果允许用itms-services协议来直接在iPhone/iPad上安装应用程序,我们可以直接生成该协议需要的相关文件,这样app在还没发到AppStore之前可以通过这种方式来安装。前提是设备要是越狱的。

app.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>http://xxx.com/.../xxx.ipa(ipa文件的url地址)</string>
               </dict>
               <dict>
                   <key>kind</key>
                   <string>display-image</string>
                   <key>needs-shine</key>
                   <true/>
                   <key>url</key>
                   <string>应用icon地址</string>
               </dict>
           <dict>
                   <key>kind</key>
                   <string>full-size-image</string>
                   <key>needs-shine</key>
                   <true/>
                   <key>url</key>
                   <string>应用大icon地址</string>
               </dict>
           </array><key>metadata</key>
           <dict>
               <key>bundle-identifier</key>
               <string>com.xxxx.xxx (应用的id, 要和ipa文件里的一样)</string>
               <key>bundle-version</key>
               <string>1.0.0</string>
               <key>kind</key>
               <string>software</string>
               <key>subtitle</key>
               <string>应用的名称</string>
               <key>title</key>
               <string>应用的名称</string>
           </dict>
       </dict>
   </array>
</dict>
</plist>

建立一个html页面

<a href="itms-services://?action=download-manifest&url=http://xxx.com/app/app.plist">越狱的iOS设备点此处安装最新版本</a>

用浏览器访问这个页面并点击就可以安装了

This entry was tagged iOS

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top