Skip to main content
Aug 17, 2017 7:58 AM UTC
Answered

App Transport Security problem in 27.0beta

Hi Community,

I tried to update my existing AIR mobile app to 27.0 beta, and the app throws an App Transport Security error when calling HTTP resource. The app was tested using a desktop emulator.

In my AIR config file, I already added the following to InfoAdditions.

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

<dict>

I tried to revert back to SDK 26.0 and 25.0, both are working well.

Thanks for helping.

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer
Sep 26, 2017 8:00 AM UTC

Hi Vivek,

I think I didn't explain it clearly, resulting in some misunderstanding, sorry about that first.

I was using IntelliJ Idea to code, compile and test the AIR application. I am not using the iOS Simulator on Mac. Is it because I try to test the app on Mac, that is why I should add those keys for AIR application for Mac platform instead of using the application descriptor?


I tried to download the latest Adobe AIR SDK 27.0 beta from Adobe Labs. The problem is resolved now. Can compile and launch the app successfully using IntelliJ Idea.

7 replies

Vivek Negi
Adobe Employee
Adobe Employee
Aug 29, 2017 2:04 PM UTC

Hi Vicker ,

Which AIR config file are you updating ? Are you talking about AIR application descriptor ?

You need to update info.plist ( with the key you mentioned in above thread )of your air application ( and not application descriptor ) if you want to allow insecure connection using your AIR apps.

-Vivek

Adobe AIR team

Translate
Aug 30, 2017 2:26 AM UTC

Thanks, Vivek.

Sorry for the naming, I meant AIR application descriptor like you've mentioned.

The application descriptor itself does have a section for iOS InfoAdditions, right? I suppose adding there should work, as previously the key NSAppTransportSecurity with NSAllowsArbitraryLoads true works very well.

Here are my full InfoAdditions for reference.

<InfoAdditions>

  <![CDATA[

  <key>UIDeviceFamily</key>

  <array>

       <!-- iPhone and iPod touch devices -->

       <string>1</string>

  </array>

  <key>UIPrerenderedIcon</key>

  <true/>

  <key>UIViewControllerBasedStatusBarAppearance</key>

  <true/>

  <key>UIStatusBarStyle</key>

  <string>UIStatusBarStyleBlackOpaque</string>

  <key>NSAppTransportSecurity</key>

  <dict>

       <key>NSAllowsArbitraryLoads</key>

       <true/>

       <key>NSExceptionDomains</key>

       <dict>

            <key>blahblah.com</key>

            <dict>

                 <key>NSExceptionAllowsInsecureHTTPLoads</key>

                 <true/>

                 <key>NSIncludesSubdomains</key>

                 <true/>

            </dict>

       </dict>

  </dict>

]]>

</InfoAdditions>

Translate
Vivek Negi
Adobe Employee
Adobe Employee
Aug 30, 2017 4:33 AM UTC

Hi Vicker,

You need to manually update info.plist with these keys for AIR application for mac platform ( and not by adding information on application descriptor like iOS ) . Please try this and let me know if it helps.

-Vivek

Adobe AIR Team

Translate
kylem91237550
Participating Frequently
Aug 26, 2017 1:04 AM UTC

In the new beta, the App Transport Security SDKs were updated. One of the new security features is that insecure connection are rejected, meaning connections made to non-secure sites (HTTP) no longer work. You'll need to make sure you connect via HTTPS for the connection to work.

Translate
Aug 26, 2017 5:19 AM UTC

Thanks, kylem91237550.

iOS do support the use of whitelist using NSExceptionDomains. However, I tried it but failed.

So does it mean that from AIR 27 onwards, all connection must be using HTTPS?

Translate