我们目前正在 IOS 和 Android 上通过无线方式部署一个新应用程序,android 可以通过简单的链接在互联网上下载 apk,但在 IOS 上,当我们尝试从下载链接。 "无法连接到 "domain.com""
我不知道出了什么问题:plist 很好,ipa 也很好,我用浏览器检查了所有链接。
plist 和 ipa 的 MIME 类型是: plist:文本/xml ipa : 应用程序/八位字节流
https://端口自定义为8443 https://domain.com:8443/webapp/app.html
下载链接:
<p><a href="itms-services://?action=download-manifest&url=https://domain.com:8443/webapp/app.plist">DownLoad Iphone APP</a></p>
这样的plist文件:
<?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>https://domain.com:8443/webapp/app.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.app.myapp</string>
<key>bundle-version</key>
<string>1.3</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>myapp</string>
</dict>
</dict>
</array>
</dict>
</plist>
我的网络服务器位于运行良好的反向代理 nginx 后面(反向代理和网络服务器之间有 8443 到 8080 的转换)等。
当我尝试下载应用程序时,反向代理的日志显示了这一点,奇怪的是我收到了 503 错误,但是所有像 chrome 这样的浏览器都有 .ipa 的 HTTP 响应 200 OK,但是当我点击我的下载时iphone 我在 nginx 日志上收到 503 错误:
2014/05/16 16:05:02 [debug] 7217#0: *18845 http script copy: "^M
"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http script copy: ""
2014/05/16 16:05:02 [debug] 7217#0: *18845 http script copy: ""
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Accept-Encoding: gzip, deflate"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "User-Agent: itunesstored/1.0 iOS/7.1.1 model/iPhone3,1 build/11D201 (4; dt:27)"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Accept-Language: fr"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Accept: */*"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header:
"GET /webapp/app.plist HTTP/1.1^M
Connection: upgrade^M
Accept-Encoding: gzip, deflate^M
User-Agent: itunesstored/1.0 iOS/7.1.1 model/iPhone3,1 build/11D201 (4; dt:27)^M
Accept-Language: fr^M
Accept: */*^M
^M
"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http cleanup add: 0000000002149C20
2014/05/16 16:05:02 [debug] 7217#0: *18845 get rr peer, try: 1
2014/05/16 16:05:02 [debug] 7217#0: *18845 socket 14
2014/05/16 16:05:02 [debug] 7217#0: *18845 epoll add connection: fd:14 ev:80000005
2014/05/16 16:05:02 [debug] 7217#0: *18845 connect to 10.xx.xx.xxx:8080, fd:14 #18846
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream connect: -2
2014/05/16 16:05:02 [debug] 7217#0: *18845 posix_memalign: 00000000020D2C20:128 @16
2014/05/16 16:05:02 [debug] 7217#0: *18845 event timer add: 14: 90000:1400249192473
2014/05/16 16:05:02 [debug] 7217#0: *18845 http finalize request: -4, "/webapp/app.plist?" a:1, c:2
2014/05/16 16:05:02 [debug] 7217#0: *18845 http request count:2 blk:0
2014/05/16 16:05:02 [debug] 7217#0: *18845 http run request: "/webapp/app.plist?"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream check client, write event:1, "/webapp/app.plist"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream recv(): -1 (11: Resource temporarily unavailable)
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream request: "/webapp/app.plist?"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream send request handler
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream send request
2014/05/16 16:05:02 [debug] 7217#0: *18845 chain writer buf fl:1 s:231
2014/05/16 16:05:02 [debug] 7217#0: *18845 chain writer in: 0000000002149C58
2014/05/16 16:05:02 [debug] 7217#0: *18845 writev: 231
2014/05/16 16:05:02 [debug] 7217#0: *18845 chain writer out: 0000000000000000
2014/05/16 16:05:02 [debug] 7217#0: *18845 event timer del: 14: 1400249192473
2014/05/16 16:05:02 [debug] 7217#0: *18845 event timer add: 14: 90000:1400249192474
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream request: "/webapp/app.plist?"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http upstream process header
2014/05/16 16:05:02 [debug] 7217#0: *18845 malloc: 000000000219B170:4096
2014/05/16 16:05:02 [debug] 7217#0: *18845 recv: fd:14 1038 of 4096
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy status 503 "503 Service Unavailable"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Content-Type: text/html; charset=UTF-8"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Content-Length: 785"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Connection: close"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Expires: Thu, 19 Nov 1981 08:52:00 GMT"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header: "ragma: no-cache"
2014/05/16 16:05:02 [debug] 7217#0: *18845 http proxy header done
2014/05/16 16:05:02 [debug] 7217#0: *18845 finalize http upstream request: 503
2014/05/16 16:05:02 [debug] 7217#0: *18845 finalize http proxy request
2014/05/16 16:05:02 [debug] 7217#0: *18845 free rr peer 1 0
我已经解决了这个问题,我需要通过后端传递完整的 HTTPS,iphone 检测到不安全的内容并取消下载。
关于IOS 应用程序无线分发 : error when download can't connect to domain,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23697842/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |