GET method network requests (HTTP and HTTPS) no longer work in Corona for iOS 9

GET method network requests (HTTP and HTTPS) no longer work in Corona for iOS 9

network.request ("http://url.php",“GET”,webListener)

network.request ("https://url.php",“GET”,webListener)

Everything worked fine before.

I just verified that the HTTP and HTTPS still work on my iPhone 5 running iOS 8.2

Also, here is my Terminal log:

Sep 22 18:24:56 iPhone appName[2012] <Warning>: GO:https://www.domain.com/url.php
Sep 22 18:24:57 iPhone appName[2012] <Warning>: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
Sep 22 18:24:57 iPhone appName[2012] <Warning>: ERROR: network request failed: https://www.domain.com/url.php [-1200: An SSL error has occurred and a secure connection to the server cannot be made.]
Sep 22 18:24:58 iPhone SpringBoard[1291] <Warning>: BSXPCMessage received error for message: Connection interrupted
Sep 22 18:24:59 iPhone appName[2012] <Warning>: GO:https://www.domain.com/url.php
Sep 22 18:24:59 iPhone SpringBoard[1291] <Warning>: UNNotificationRegistrarConnectionListener connection invalidated

system.openURL​ seems to fail as well in iOS 9. I had the problem on my iPhone. I tested it on my iPad, I opened the link before I installed iOS 9 it worked, when I upgraded to iOS 9 it doesn’t open the link. I’m using daily build 2015.2721.

This looks like an ATS issue.

Thank you, you are right. The ATS link you provided explains it all. To solve this, which I’ve now tested works fine on my iPhone 6 Plus (v9 iOS), I’ve done two things:

  1. I’ve whitelisted the links in the plist of my build.settings as follows:

settings =
 {
  iphone =
   {
    plist =
     {
      NSAppTransportSecurity =
       {
        NSExceptionDomains =
         {
          [“example.com”] =
           {
            NSIncludesSubdomains = true,
            NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
           },
         },
       },
     },
   },
 }

  1. I’ve contacted my server hosting provider and asked them to upgrade my SSL certificate from SHA1 to SHA2 (SHA256), after which, I should ‘possibly’ be able to remove the whitelisting above.

Hope this helps someone - if it does, please let us know.

system.openURL​ seems to fail as well in iOS 9. I had the problem on my iPhone. I tested it on my iPad, I opened the link before I installed iOS 9 it worked, when I upgraded to iOS 9 it doesn’t open the link. I’m using daily build 2015.2721.

This looks like an ATS issue.

Thank you, you are right. The ATS link you provided explains it all. To solve this, which I’ve now tested works fine on my iPhone 6 Plus (v9 iOS), I’ve done two things:

  1. I’ve whitelisted the links in the plist of my build.settings as follows:

settings =
 {
  iphone =
   {
    plist =
     {
      NSAppTransportSecurity =
       {
        NSExceptionDomains =
         {
          [“example.com”] =
           {
            NSIncludesSubdomains = true,
            NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
           },
         },
       },
     },
   },
 }

  1. I’ve contacted my server hosting provider and asked them to upgrade my SSL certificate from SHA1 to SHA2 (SHA256), after which, I should ‘possibly’ be able to remove the whitelisting above.

Hope this helps someone - if it does, please let us know.