Problems with https on iPad from Air app

2019-08-05 04:30发布

I have developed an in-house Air app for the iPad that tries to connect to a jetty web server via SSL (https) using HTTPService. Even the simplest GET returns error #2032 (runs OK with plain http).

I have checked the obvious things: URL is correct, certificate is correct and correctly installed, I am using the right port, which is open. As a matter of fact, the URL can be accessed from Safari on the iPad without problems. It also runs correctly on adl.

I am using an iPad 2 with iOS 5. The application was built with Air 4.6.

Any ideas?

4条回答
太酷不给撩
2楼-- · 2019-08-05 05:01

https is not yet supported in mobile Air applications

查看更多
The star\"
3楼-- · 2019-08-05 05:01

You need to upgrade your AIR version from 3.1 to latest one. Adobe AIR 3.2 also supports self signed certificate.

查看更多
等我变得足够好
4楼-- · 2019-08-05 05:18

you have posted in my Thread. I found a solution for this problem by myself. it works fine for me.

If you have a certificate which is signed by a third company it should work. if not, do the following steps:

First I have changed the contentType from the loader ( I use the HTTPService from Flex) to "application/x-www-form-urlencoded"; but I think its only important in my case.

Second created a StageWebView, place it on stage and give it a viewport outside the screen. Than call the function loadURL from the StageWebView with your https url on startup of the application.

If the application runs on an ios device, a dialog apears that ask you if you want to allow a selfsigned certificate. After you have accept the certificate the next request will work.

There are two disadvantages: • You have to accept the certificate on every new Startup of the app. • You first call (over the stageWebView) will not work. Because this calls the dialog and you cant dispatch the dialog input. So you have to handle it by yourself that you make your HTTPS request after that dialog.

查看更多
闹够了就滚
5楼-- · 2019-08-05 05:18

Contrary to what @Eduardo posted, HTTPS works just fine in AIR, as long as the certificate is valid.

查看更多
登录 后发表回答