Skip to main content
Known Participant
Feb 23, 2016 5:13 PM UTC
Answered

No network in iOS

I'm recompiling an iOS app with Animate CC and Adobe Air SDK 20.0.0.260 and the app cannot access the network.

This is pretty serious and completely breaks my app. I have tried it in iOS 9.1 and 9.2.1 on 2 different devices. And yes the device is connected to Wifi.

The code works fine when testing on computer. When debugging on device URLMonitor reports no network available and URLLoader event HTTPStatusEvent.HTTP_RESPONSE_STATUS never fires (which makes sense since the app thinks it has no network).

I've tried using a previous version of Adobe Air SDK but Animate CC won't let me add previous versions.

I'm installing the previous version of Flash Pro and will report back.

This topic is closed to new replies. Start a new post to keep the conversation going.
Roshan ChhetriCorrect answer
Adobe Employee
Feb 23, 2016 5:57 PM UTC

Hi,

This is not a AIR bug but this is due to new feature introduced on iOS 9+ devices.

Please add the following in your app's iPhone info-additions and check if the issue is solved.

you can replace www.abcd.com with the url you are trying to access.

<key>NSAppTransportSecurity</key>

<dict>

<key>NSExceptionDomains</key>

<dict>

<key>www.abcd.com</key>

<dict>

<!--Include to allow subdomains-->

<key>NSIncludesSubdomains</key>

<true/>

<!--Include to allow HTTP requests-->

<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>

<true/>

<!--Include to specify minimum TLS version-->

<key>NSTemporaryExceptionMinimumTLSVersion</key>

<string>TLSv1.1</string>

</dict>

</dict>

</dict>

11 replies

Adobe Employee
Feb 24, 2016 6:09 AM UTC

Also, Can you please confirm if you are trying with 20.0.260 build?

Translate
Lars Laborious
Legend
Feb 24, 2016 9:15 AM UTC

Roshan, woudn't it be enough with just adding:

<key>NSAppTransportSecurity</key>

  <dict>

    <key>NSAllowsArbitraryLoads</key>

    <true/>

  </dict>

I have an app that does a few http requests and by adding just these lines in the info-additions, I get it to work in AIR 20+.

Or will Apple require us to specify the domains?

Translate
Adobe Employee
Feb 24, 2016 9:25 AM UTC

Hi @Lars Laborious,

You can definitely add it , but this will enable your app's connection to all http URL's and Apple does not require us to specify domains ( as per my knowledge).


However, It is always advisable to add the known http url's in your xml such that it communicates only to the url's that developer knows.

-Roshan

Translate
MonicaMPAuthor
Known Participant
Feb 23, 2016 5:42 PM UTC

So I installed the last version of Flash Pro and was able to get network on device by compiling with SDK 19.

Compiled with SDK 20.0.0.206 = No network

Compiled with SDK 19.0.0.180 = Network OK

I think it's fair to say this is Adobe Air 20 bug.

Translate
Roshan ChhetriCorrect answer
Adobe Employee
Feb 23, 2016 5:57 PM UTC

Hi,

This is not a AIR bug but this is due to new feature introduced on iOS 9+ devices.

Please add the following in your app's iPhone info-additions and check if the issue is solved.

you can replace www.abcd.com with the url you are trying to access.

<key>NSAppTransportSecurity</key>

<dict>

<key>NSExceptionDomains</key>

<dict>

<key>www.abcd.com</key>

<dict>

<!--Include to allow subdomains-->

<key>NSIncludesSubdomains</key>

<true/>

<!--Include to allow HTTP requests-->

<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>

<true/>

<!--Include to specify minimum TLS version-->

<key>NSTemporaryExceptionMinimumTLSVersion</key>

<string>TLSv1.1</string>

</dict>

</dict>

</dict>

Translate
MonicaMPAuthor
Known Participant
Feb 23, 2016 6:30 PM UTC

If that's the case why does it work when compiling with SDK 19 without modifying info-additions ?

Translate