• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Community Beginner ,
Jul 01, 2016 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

304

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
community guidelines