Skip to main content
Inspiring
April 14, 2016
Answered

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

  • April 14, 2016
  • 2 replies
  • 1220 views

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 has been closed for replies.
Correct answer marcanw

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

2 replies

Shweta_B
Adobe Employee
Adobe Employee
April 19, 2016

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

Applauz78Author
Inspiring
April 20, 2016

Crashes for me in 22 Beta

Shweta_B
Adobe Employee
Adobe Employee
April 21, 2016

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

marcanwCorrect answer
Inspiring
April 14, 2016

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

Applauz78Author
Inspiring
April 14, 2016

Bingo!  Thanks!

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