0 Replies Latest reply on Jul 1, 2016 3:05 AM by xiaoyangsss

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

    xiaoyangsss Level 1

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



      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.



      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?