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

URLLoader error #2032 with AIR 20 (AIR 19 works)

Community Beginner ,
Dec 10, 2015 Dec 10, 2015

Copy link to clipboard

Copied

Hello, I've updated from Flex 4.14.0 + AIR 19 build 143 to Flex 4.14.0 + AIR 20 build 206, now my code with URLLoader on a HTTP connection without SSL doesn't work on iOS (error #2032).

The device I'm testing on is an iPad Mini Retina with iOS 9.2.

The url is reachable with Safari.

Snippet is the following:

var url:String = "http://www.falcosoft.it/catalogo/catalogo.xml";

var onComplete:Function = function(event:Event):void {

  // this code doesn't get called

  loader.removeEventListener(Event.COMPLETE, onComplete);

};

var onIOError:Function = function(event:IOErrorEvent):void {

  // the program always calls onIOError with error #2032: Stream error

  loader.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);

};

var onSecurityError:Function = function(event:SecurityErrorEvent):void {

  loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);

};

var request:URLRequest = new URLRequest(url);

request.method = URLRequestMethod.GET;

var loader:URLLoader = new URLLoader();

loader.dataFormat = URLLoaderDataFormat.BINARY;

loader.addEventListener(Event.COMPLETE, onComplete);

loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);

loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);

loader.load(request);

TOPICS
Air beta

Views

4.0K

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

correct answers 1 Correct answer

Community Beginner , Dec 10, 2015 Dec 10, 2015

My bad.

I didn't see the section in the FAQ explaining that Apple is limiting access to unsecured web connections.

I'd like not to delete the question because searching for the problem on search engines didn't lead to recent answers.

I will try to add the following manifest addition to bypass the problem.

<iPhone>

<InfoAdditions>

<![CDATA[

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key><true/>

</dict>

]]>

</InfoAdditions>

</iPhone>

Votes

Translate

Translate
Community Beginner ,
Dec 10, 2015 Dec 10, 2015

Copy link to clipboard

Copied

My bad.

I didn't see the section in the FAQ explaining that Apple is limiting access to unsecured web connections.

I'd like not to delete the question because searching for the problem on search engines didn't lead to recent answers.

I will try to add the following manifest addition to bypass the problem.

<iPhone>

<InfoAdditions>

<![CDATA[

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key><true/>

</dict>

]]>

</InfoAdditions>

</iPhone>

Votes

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
Adobe Employee ,
Dec 10, 2015 Dec 10, 2015

Copy link to clipboard

Copied

Hi,

App Transport Security (ATS) is being introduced from Apple in iOS9, which doesn’t allow unsecure connections between App and Web services. Due to this change all the connections which are made to unsecure web sites via Loader, URLLoader will discontinue and not work due to App Transport Security. Please specify exceptions to the default behavior by adding keys to InfoAdditions tag of application descriptor of your app.  

<key>NSAppTransportSecurity</key>

  <dict>

  <key>NSAllowsArbitraryLoads</key><true/>

  </dict>

Same has been mentioned in : http://fpdownload.macromedia.com/pub/labs/flashruntimes/shared/air20_flashplayer20_releasenotes.pdf

Roshan

Adobe AIR

Votes

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
Explorer ,
Dec 14, 2015 Dec 14, 2015

Copy link to clipboard

Copied

Is there a difference with ad hoc builds and release builds regarding the loading perhaps? My ad hoc build seems to load my content just fine without the ATS additions into the app descriptor...

Votes

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
Community Beginner ,
Dec 14, 2015 Dec 14, 2015

Copy link to clipboard

Copied

LATEST

My ad hoc build did NOT load any http content without the fix

Votes

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