共计 1631 个字符,预计需要花费 5 分钟才能阅读完成。
越狱后的 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个注释点):
<?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 -->
<string>http://lxxh.lzw.me/pages/lxxh/ios/lxxh-latest.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<!-- 注意:应用程序icon url, 57x57 -->
<string>http://lxxh.lzw.me/pages/lxxh/webapp/img/icon/57.png</string>
</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
正文完