ios7.1 in-house app的发布方法

时间:2023-01-12 20:06:43

iOS7.1版本的in-house app必须发布到https站点才能下载安装,原来的连接:

itms-services://?action=download-manifest&url=http://example.com/manifest.plist

需要修改为:

itms-services://?action=download-manifest&url=https://example.com/manifest.plist

可参见:

http://www.hanchorllc.com/2014/02/01/ios-7-1-requires-ad-hoc-installs-to-be-over-https/

 

方案1:将ipa文件和plist文件上传到dropBox上,可参见:

http://*.com/questions/20276907/enterprise-app-deployment-doesnt-work-on-ios-7-1/22367111#22367111

方案2:购买第三方CA证书

方案3:使用openssl生成自签名证书

 

现以apache_2.2.8作为web服务器为例说明方案3

1. 安装并配置apache

  • 下载apache_2.2.8-win32-x86-openssl-0.9.8g.msi,这个版本自带openssl,安装后配置httpd.conf文件:
  • 去掉LoadModule ssl_module modules/mod_ssl.so前面的井号
  • 去掉Include conf/extra/httpd-ssl.conf前面的井号
  • 配置httpd-ssl.conf文件:
  • SSLSessionCache        "shmcb:D:/Program Files (x86)/Apache Software Foundation/Apache2.2/logs/ssl_scache(512000)"注释掉,否则报错:SSLSessionCache: Invalid argument: size has to be >= 8192 bytes

2. 生成证书

将文件openssl.cnf拷贝到bin目录下,依次执行下列语句:

openssl genrsa -out server.key 1024

openssl req -new -key server.key -out server.csr -config openssl.cnf

openssl genrsa  -out ca.key 1024

openssl req  -new -x509 -days 365 -key ca.key -out ca.crt  -config openssl.cnf 

openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config openssl.cnf

 

如提示输入Common Name,请输入服务器IP或域名。最后一条指令执行前需要在bin目录创建demoCA,里面创建文件夹newcerts和文件index.txt及serialindex.txt为空,serial内容为01

将生成的文件server.crtserver.key拷贝到D:\Program Files\Apache Group\Apache2\conf下面,这个位置可以在httpd-ssl.conf文件中修改

将.plist和.ipa文件拷贝到D:\Program Files\Apache Group\Apache2\htdocs,这个位置也可以在httpd-ssl.conf中修改,如果是http访问方式则在httpd.conf中修改

3. 在设备上安装app

ca.crt用邮件发送到设备,在设备上安装后用Safari访问

tms-services://?action=download-manifest&url=https://example.com/manifest.plist。实际情况下可以做一个html文件,把上述地址做出一个链接。

4. 注意

  • 如果安装apahce后没有自动生成windows服务,请执行bin目录下的httpd命令,格式:

      httpd -k -install

  • 如果是较早的apahce版本,可能没有这个命令,请执行:

      Apache -k install

  • apahce服务不能正常启动,可在开始菜单找到-Apache HTTP Server 2.0-Configure Apache Server-Test Configuration,运行并查看结果,也可以在cmd下运行直接运行httpd。
  • http访问的端在httpd.conf文件中设置(ctrl+f搜索808080
  • https访问端口在httpd-ssl.conf文件中设置(ctrl+f搜索443

5. 参考

http://blog.csdn.net/zhaoxy_thu/article/details/21133399#reply

http://*.com/questions/22411449/ios-7-1-ota-ssl-error

http://*.com/questions/20276907/enterprise-app-deployment-doesnt-work-on-ios-7-1/22367111#22367111

http://www.hanchorllc.com/2014/02/01/ios-7-1-requires-ad-hoc-installs-to-be-over-https/

http://hi.baidu.com/johnzhjfly/item/024b494104674ee91e19bc95