通过itms-services协议,可以通过safari浏览器直接在iOS设备上安装应用程序。利用这种方式,只要在内网布置一个服务器,测试人员只需要通过测试设备的safari浏览器访问特定的url既可以实现安装,然后测试了。(PS:越狱设备也可以)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34<?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>ipa包的下载地址,如:http://www.tammy.com:450/static/ios/(targetname)_(version)_build(buildversion)_yyyyMMdd.ipa</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>应用程序中的bundle-identifier</string> <key>bundle-version</key> <string>版本号</string> <key>kind</key> <string>software</string> <key>subtitle</key> <string>子标题</string> <key>title</key> <string>软件名称</string> </dict> </dict> </array> </dict> </plist>
html文件范例如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <title>测试包安装</title> </head> <body> <br> <div style="position:absolute;left:200px" width=400><a href="../index.html">返回</a></div> <h1 align="center">开发版(TRUNK)</h1> <table align="center" border=1 width=400> <tr height=60> <th colspan=2><h2>标题</h2></th> </tr> <tr height=60 align="center"> <td width=200><a href="itms-services://?action=download-manifest&url=http://www.tammy.com:450/static/ios/****.plist"><h2>Install</h2></a></td> <td width=200><a href="
复制代码"><h2>Download</h2></a></td></tr> </table><br></body></html>http://www.tammy.com:450/static/ios/(targetname)_(version)_build(buildversion)_yyyyMMdd.ipa
1、设置签名
利用developer profile或者adhoc distribution profile签名app,注意,不能使用distribution profile方式签名;个人开发者证书只能在100个设备中实现无线安装。
2、生成arichive
菜单:product->archive,完成后可以在organizer中看到生成的arichive。
3、生成ipa
选择刚刚生成的arichive,点击“Distribute...",弹出如下图界面,选择第二个,点“next”,设置相关参数,一定要勾选“save for enterprise distribution”。application url,是生成的ipa在服务器的位置;title是安装过程中出现的标题;large image url 和 smal image url是安装过程中出现的图标。点击保存,将生成两个文件:***.ipa和***.plist。
4、服务器部署
将生成的***.ipa和***.plist文件部署到服务器,同时在服务器生成一个html文件,目的是点击后打开一个链接,这样ios设备就会执行指令自动安装app了。要打开的链接内容如下:
itms-services://?action=download-manifest&url=http://www.tammy.com:450/static/ios/****.plist
最后
以上就是傲娇糖豆最近收集整理的关于不通过App Store,在iOS设备上直接安装应用程序的原理的全部内容,更多相关不通过App内容请搜索靠谱客的其他文章。
发表评论 取消回复