发一段网址就能安装测试项目

来源:互联网 发布:记忆力训练软件哪种好 编辑:程序博客网 时间:2024/05/22 11:56

今天在iOS设备上安装天翼云存储app,在safari上直接打开http://cloud.189.cn/wap/index.jsp,点击“点击免费安装”,如下图:

神奇的事情发生了,设备上直接下载app然后安装了,不需要经过app stroe。安装完后第一次点击app打开,会提示“是否打开distribution”之类的。去app store搜索一番,发现没有“天翼云存储”这个app。

这一下可被震惊了,可能孤陋寡闻,ios的app还可以用这种方式来安装,那以后可不方便了?

好奇心来了,研究了一下,发现点击打开的链接如下:

itms-services:///?action=download-manifest&url=http://cloud.189.cn/download/client/iOS/cloud189.plist?v=D1.0.6

google了一番,终于有些眉目了,打开这个地址:http://cloud.189.cn/download/client/iOS/cloud189.plist,会看到一个plist文件,内容如下:

[html] view plain copy
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">  
  3. <plist version="1.0">  
  4. <dict>  
  5.     <key>items</key>  
  6.     <array>  
  7.         <dict>  
  8.             <key>assets</key>  
  9.             <array>  
  10.                 <dict>  
  11.                     <key>kind</key>  
  12.                     <string>software-package</string>  
  13.                     <key>url</key>  
  14.                     <string>http://cloud.189.cn/download/client/iOS/cloud189_1.1.1.ipa</string>  
  15.                 </dict>  
  16.             </array>  
  17.             <key>metadata</key>  
  18.             <dict>  
  19.                 <key>bundle-identifier</key>  
  20.                 <string>com.21cn.cloud189</string>  
  21.                 <key>bundle-version</key>  
  22.                 <string>1.1.1</string>  
  23.                 <key>kind</key>  
  24.                 <string>software</string>  
  25.                 <key>title</key>  
  26.                 <string>天翼云存储</string>  
  27.             </dict>  
  28.         </dict>  
  29.     </array>  
  30. </dict>  
  31. </plist>  

ipa放在这个位置:
http://cloud.189.cn/download/client/iOS/cloud189_1.1.1.ipa
这种安装方式是利用apple推荐的使用企业证书签名app的部署方式来安装程序,天翼云存储就是利用这样的方式,绕过了app store,直接在ios设备上安装,严格来说其实是不符合apple的相关规定的。
再深入了解,除了企业证书签名的app,用普通签名方式的app,在打包profile中指定的100个设备上也可以用这种方式安装。呵呵,这可好了,这下子就可以解决发布未经过审核app或者内部测试app的问题了,事不宜迟,马上动手测试。

后续:

经过测试,个人证书签名是可以按这种方式发布app的,具体步骤看这里:

http://blog.csdn.net/sing_sing/article/details/7497794


最新的更新请看这里:

iOS 7.1使用企业应用部署方式无法安装app(2014-09-13更新:dropbox被墙后的解决方案)

http://blog.csdn.net/sing_sing/article/details/23662657


// ---------------------------------------



解释一下这标题:apple个人开发者证书无线发布app的实现,也就是说不经过发布到app store,直接在ios设备上安装app,注:ios设备不需要越狱。

之所以有这篇文章的产生,可以看这里:

不通过App Store,在iOS设备上直接安装应用程序

下面直接上图,介绍实现步骤:

1、设置签名

利用developer profile或者adhoc distribution profile签名app,注意,不能使用distribution profile方式签名,经过测试,是无法安装的。其中原因个人认为developer profile和adhoc distribution profile都可以指定设备,跟之前了解到的,个人开发者证书只能在100个设备中实现无线安装是一致的。

2、生成arichive

菜单:product->build for->arichiving,然后product->archive,完成后可以在organizer中看到生成的arichive。

3、生成ipa

选择刚刚生成的arichive,点击“Distribute...",弹出如下图界面,选择第二个:


选择后点“next”,设置相关参数,如下图:


一定要勾选“save for enterprise distribution”,简单解释一下各个参数。

application url,是生成的ipa在服务器的位置;title是安装过程中出现的标题;subtitle暂时不清楚做何用处;large image url 和 smal image url是安装过程中出现的图标。

点击保存,将生成两个文件:myApp.ipa和myApp.plist。

4、服务器部署

将myApp.ipa和myApp.plist部署到服务器,同时在服务器生成一个html文件,目的是点击后打开一个链接,这样ios设备就会执行指令自动安装app了。

要打开的链接内容如下:

itms-services://?action=download-manifest&url=http://192.168.5.7:8080/stgApp.plist

5、附一个偷回来的html文件:

[html] view plain copy
  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4.         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  
  5.         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />   
  6.         <title>Install Geoloqi</title>  
  7.         <style type="text/css">  
  8.                 body {  
  9.                         background: url(bkg.png) repeat #c5ccd4;  
  10.                         font-family: Helvetica, arial, sans-serif;  
  11.                 }  
  12.                 .congrats {  
  13.                         font-size: 16pt;  
  14.                         padding: 6px;  
  15.                         text-align: center;  
  16.                 }  
  17.                 .step {  
  18.                         background: white;  
  19.                         border: 1px #ccc solid;  
  20.                         border-radius: 14px;  
  21.                         padding: 4px 10px;  
  22.                         margin: 10px 0;  
  23.                 }  
  24.                 .instructions {  
  25.                         font-size: 10pt;  
  26.                 }  
  27.                 .arrow {  
  28.                         font-size: 15pt;  
  29.                 }  
  30.                 table {  
  31.                         width: 100%;  
  32.                 }  
  33.         </style>  
  34. </head>  
  35. <body>  
  36.    
  37. <div class="congrats">Congrats! You've been invited to the beta of Geoloqi.</div>  
  38.    
  39. <div class="step">  
  40.         <table><tr>  
  41.                 <td class="instructions">Install the<br />FilmPicker App</td>  
  42.                 <td width="24" class="arrow"></td>  
  43.                 <td width="72" class="imagelink">  
  44.                         <a href="itms-services://?action=download-manifest&url=http://192.168.5.7:8080/stgApp.plist">  
  45.                                 <img src="icon.png" height="72" width="72" />  
  46.                          </a>  
  47.                 </td>  
  48.         </tr></table>  
  49. </div>  
  50.    
  51. </body>  
  52. </html>  

以上步骤顺利经过测试。在摸索过程中参考了以下几篇文章,粘贴一下,以表示对作者迷途指导的感激之情。

How to Distribute your iOS Apps Over the Air

无需iTunes,无线发布iOS App


======================

2014-05-27补充

由于iOS7.1之后苹果增加了安全认证机制,所以itms-services:协议需要通过https来实现,因此部署上会有些改动,需要将之前http改成https。如果手头暂时没有https服务器,可以借助提供https服务的云端服务器,如dropbox。详细设置看本人的另一篇文章:

iOS 7.1使用企业应用部署方式无法安装app




原创粉丝点击