Skip to main content
Inspiring
Apr 14, 2016 7:33 PM UTC
Answered

new URLLoader() broken in AIR 21 + [HELP]

Any idea why line 6 is crashing in AIR 21 but works fine in AIR 20 and below ?

    sendHeader = new URLRequestHeader("Content-type","application/octet-stream");

    sendReq = new URLRequest(phpPath);

    sendReq.requestHeaders.push(sendHeader);

    sendReq.method = URLRequestMethod.POST;

  

    sendLoader = new URLLoader();

    sendLoader.addEventListener(Event.COMPLETE,imageSentHandler);

  sendLoader.addEventListener(ErrorEvent.ERROR, onError);

This topic is closed to new replies. Start a new post to keep the conversation going.
marcanwCorrect answer
Inspiring
Apr 14, 2016 7:46 PM UTC

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

11 replies

Shweta_B
Adobe Employee
Adobe Employee
Apr 19, 2016 10:02 AM UTC

Hi,

Thanks for the report.

We tried the issue at our end with the latest AIR 22 Beta and were not able to reproduce on both iOS and Android.

Please find the attached project link:

Dropbox - URLRequestHeaderExample.zip

Could you please try the same at your end as well with the latest AIR 22 Beta and let us know in case you still face any issue.

Regards,

Adobe AIR Team

Translate
Applauz78Author
Inspiring
Apr 20, 2016 10:20 PM UTC

Crashes for me in 22 Beta

Translate
Shweta_B
Adobe Employee
Adobe Employee
Apr 21, 2016 5:12 AM UTC

Hi,

Is this issue reproducible on iOS and android both?

Could you please share a sample project with us. This would help us in reproducing the issue at our end as well.

Thanks,

Adobe AIR Team

Translate
marcanwCorrect answer
Inspiring
Apr 14, 2016 7:46 PM UTC

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

Translate
Applauz78Author
Inspiring
Apr 14, 2016 7:58 PM UTC

Bingo!  Thanks!

When was this introduced? It worked fine for me in AIR 20

Translate