越狱后的 iOS 可以实现像企业证书分发程序那样通过访问网页点击按钮一键安装APP。
先决条件:
已越狱(Jailbreak)
越狱后已安装 Appsync
步骤:
1. 在 html 页面加入类似如下链接内容(url中的 lxxh.plist 就是下面新建的 lxxh.plist 文件路径):
<a href=”itms-services://?action=download-manifest&url=http://lzw.me/pages/lxxh/ios/lxxh.plist”>点此安装</a>
2. 新建 lxxh.plist 文件,内容如下(修改内容中4个注释点):
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 35 36 37 38 39 40 41 42 43 44 45 | <? 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 > <!-- 注意:IPA文件URL --> </ dict > < dict > < key >kind</ key > < string >display-image</ string > < key >needs-shine</ key > < true /> < key >url</ key > <!-- 注意:应用程序icon url, 57x57 --> </ dict > </ array > < key >metadata</ key > < dict > < key >bundle-identifier</ key > <!-- 注意:应用程序identifier --> < string >com.sinaapp.SAElzwmeapp</ string > < key >bundle-version</ key > < string >1.0</ string > < key >kind</ key > < string >software</ string > < key >subtitle</ key > < string >lzw.me</ string > < key >title</ key > <!-- 注意:应用程序名称 --> < string >离线笑话</ string > </ dict > </ dict > </ array > </ dict > </ plist > |
3.访问该html页面点击“点此安装”测试。
附:iOS 7.1下 itms-services 在线安装失败的解决方法
IOS 7.1 修改了manifest.plist文件的访问协议,之前可以通过http协议访问,在iOS 7.1之后必须使用https协议方式访问。
比如之前的链接代码为:
itms-services://?action=download-manifest&url=http://example.com/manifest.plist
在iOS 7.1之后,就需要修改为:
itms-services://?action=download-manifest&url=https://example.com/manifest.plist
需要一个SSL证书才能够实现在线安装ipa文件的功能。
相关参考
http://blog.csdn.net/bihailantian1988/article/details/12973507
http://blog.sqstudio.com/other/ios/955.html
新手上路,请多多指教,感觉好难哦,,要多花时间和精力好好学习下。