利用itms services发布app

来源:互联网 发布:编程英语怎么说 编辑:程序博客网 时间:2024/05/21 09:59
前期准备:
  • app的个人账号 或者 企业账号(进过测试均可以实现)
  • tomcat(或其他中间键)
  • eclipse(或其他IDE)
  • IPAD或者IPHONE



第一步:注册设备,生成证书。
  • 登陆https://developer.apple.com/
  • 点击“会员中心”(Member Center)
  • 登陆你的App账号,生成证书
  • ......
  • 具体的流程,网上非常多,自己去找。
  • 最终得到2个文件,一个 *.p12 和 *. mobileprovision文件,双击打开就可以了。

注:
  • 如果你使用的是个人账号,要生成“开发证书”,在生成钥匙串和证书文件的时候,选择Development。
  • Devices中添加的设备,才可以进行无线安装,如果没有添加,在安装的过程中,提示“无法安装应用程序”



第二步:生成ipa和plist文件
  • 打开xcode,设备选择你的设备或者IOS Device,不要选择模拟器
  • Product --》 Archive
  • 点击发布按钮

 4. 选择方式
   
 5. 选择证书
   
 6.把证书打包到ipa中,这样就不需要安装描述文件了。可一直进行安装。

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

   application url,是生成的ipa在服务器的位置;

   title是安装过程中出现的标题;

   large image url 和 smal image url是安装过程中出现的图标。

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

    

服务器部署

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

要打开的链接内容如下:

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

方式安装是依赖于 Safari 解析 itms-services:// 协议实现的


5、附一个html文件:

 

1<!DOCTYPE html><p></p><html><head>        <meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=iso-8859-1\\">        <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\\" />         <title>Install Geoloqi</title>        <styletype=\\"text/css\\">                body {                        background: url(bkg.png) repeat #c5ccd4;                        font-family: Helvetica, arial, sans-serif;                }                .congrats {                        font-size: 16pt;                        padding: 6px;                        text-align: center;                }                .step {                        background: white;                        border: 1px #ccc solid;                        border-radius: 14px;                        padding: 4px 10px;                        margin: 10px 0;                }                .instructions {                        font-size: 10pt;                }                .arrow {                        font-size: 15pt;                }                table {                        width: 100%;                }        </style></head><body> <div class=\\"congrats\\">Congrats! You've been invited to the beta of Geoloqi.</div> <div class=\\"step\\">        <table><tr>                <td class=\\"instructions\\">Install the<br />FilmPicker App</td>                <td width=\\"24\\" class=\\"arrow\\">→</td>                <tdwidth=\\"72\\" class=\\"imagelink\\">                        <ahref=\\"itms-services://?action=download-manifest&url=http://192.168.5.7:8080/stgApp.plist\\">                                <img src=\\"icon.png\\" height=\\"72\\" width=\\"72\\" />                         </a>                </td>        </tr></table></div> </body></html>

    以上步骤,经过测试,已经通过。

    在Safari上,输入部署地址,点击即可进行下载。


    转载地址:http://www.devdiv.com/forum.php?mod=viewthread&tid=204412

    相关资料:http://hi.baidu.com/xiaoyao9668/item/bf1b331d5a6ecc9e99ce33ff


    IOS7.1 企业应用 证书无效解决办法

    通过测试,已经完美解决。


    方案一:
    http://blog.csdn.net/zhaoxy_thu/article/details/21133399


    方案二:最简单,实用。


    使用dropBox


    如何安装,自己度之。
    当你使用XCODE发布安装包IPA和PLIST文件后,将IPA仍然保存在你常用保存的网站上,只要可以正常连接下载即可。
    PLIST文件是供手机版SAFARI解析的文件,里面包含有IPA的下载地址。所以我们的重点就是将PLIST文件保存在支持HTTPS的网站上。并且供用户访问。


    将你生成的PLIST文件上传到dropBox后,你就能在文件列表中看到你已经上传的文件。然后在此文件上右键选择共享,此时会要求你输入共享人的邮箱,不管它。直接在弹出的对话框中选择右下角的复制,这个时候,你已经拿到了我们需要用的HTTPS连接。比如为:


    itms-services://?action=download-manifest&url=https://www.dropbox.com/s/veimpxpa2fm0cqo/×××.plist


    ,这个连接还不能在手机版的SARAFI上使用,我们需要二次加工。


    将连接中标为红色的www.dropbox.com替换成dl.dropboxusercontent.com即为:



    itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/veimpxpa2fm0cqo/×××.plist


    ok,我们终于拿到了我们需要的HTTPS连接。
    因为考虑到IOS7.1之前的系统仍然是HTTP访问,故我们需要做以一下处理


    #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_0
                    trackUrl =itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/veimpxpa2fm0cqo/×××.plist;
    #else

      trackUrl =你以前的的PLIST文件的地址;

    #endif



    而至于dropBox的使用,请自己查看相关文档。

    相关资料:http://www.epeiwang.com/blog/?m=201506(包含安卓)

    转载地址:http://www.cocoachina.com/bbs/read.php?tid=194213


    0 0