Highlighted

we use urlloader in ios9.3.2 but haven't touched off the HTTPStatusEvent.

Community Beginner ,
Jul 01, 2016

Copy link to clipboard

Copied

we have a app for ios with completely disable App Transport Security by using <key>NSAllowsArbitraryLoads</key><true/>.

我们有一个IOS的APP,关闭了ATS的.

when we used URLMonitor for checking the network is working well or not,the URLMonitor Event either StatusEvent.STATUS or HTTPStatusEvent.HTTP_RESPONSE_STATUS haven't been touched off.

当我们使用URLMonitor 去检查网络是否正常工作,这个URLMonitor 事件,不管是StatusEvent.STATUS 还是 HTTPStatusEvent.HTTP_RESPONSE_STATUS都没有被触发

  var url:URLRequest = new URLRequest("http://" + ip_url);

  url.method = "HEAD";

  var monitor:URLMonitor = new URLMonitor(url);

  monitor.pollInterval = 3 * 1000;

  monitor.addEventListener(StatusEvent.STATUS,  monitor_STATUS);

  function monitor_STATUS(e:StatusEvent):void

  {

  Logger.LogTry("网络连接" + e.targetmonitor.available.toString())

}

if there was no network,it should touch off the event that tell me the monitor.available is false,or the network can work ,tell me the monitor.available is true.

如果没有网络,那应该触发monitor.available是false的值.反之有网络,monitor.available是true

The result is  it havn't touched off no any StatusEvent.

结果是没有出发任何事件.

I want to know what is the reason is that URLMonitor havent received any event?

我想知道没有收到任何事件是原因是什么?

TOPICS
Development

Views

241

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

we use urlloader in ios9.3.2 but haven't touched off the HTTPStatusEvent.

Community Beginner ,
Jul 01, 2016

Copy link to clipboard

Copied

we have a app for ios with completely disable App Transport Security by using <key>NSAllowsArbitraryLoads</key><true/>.

我们有一个IOS的APP,关闭了ATS的.

when we used URLMonitor for checking the network is working well or not,the URLMonitor Event either StatusEvent.STATUS or HTTPStatusEvent.HTTP_RESPONSE_STATUS haven't been touched off.

当我们使用URLMonitor 去检查网络是否正常工作,这个URLMonitor 事件,不管是StatusEvent.STATUS 还是 HTTPStatusEvent.HTTP_RESPONSE_STATUS都没有被触发

  var url:URLRequest = new URLRequest("http://" + ip_url);

  url.method = "HEAD";

  var monitor:URLMonitor = new URLMonitor(url);

  monitor.pollInterval = 3 * 1000;

  monitor.addEventListener(StatusEvent.STATUS,  monitor_STATUS);

  function monitor_STATUS(e:StatusEvent):void

  {

  Logger.LogTry("网络连接" + e.targetmonitor.available.toString())

}

if there was no network,it should touch off the event that tell me the monitor.available is false,or the network can work ,tell me the monitor.available is true.

如果没有网络,那应该触发monitor.available是false的值.反之有网络,monitor.available是true

The result is  it havn't touched off no any StatusEvent.

结果是没有出发任何事件.

I want to know what is the reason is that URLMonitor havent received any event?

我想知道没有收到任何事件是原因是什么?

TOPICS
Development

Views

242

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 01, 2016 0

Have something to add?

Join the conversation