iOS 11 HTTP requests

I'm developing an iOS application and after iOS 11 my HTTP requests not working any more.

It's possíble to perform HTTP requests on iOS 11?

Replies

It's possíble to perform HTTP requests on iOS 11?

Yes. If you post a description of the symptoms of your failure, I may be able to offer some advice on what’s causing it.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Before the iOS 11 release, we submit our app to review and it was aproved.

After the iOS 11 release we submit a new version but the revision team report that can't login. The login credentials are correct and it's working fine on our physical iPhone 5 (10.3.3) and in all iOS 11 simulators.


The message shown is relative to a login failure. We suspect the aplication couldn't login because it can't communicate with our server and we think the problem could be the HTTP request.


Here is our Transport Security configuration in Info.plist file:

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>


Thank you in advance.

We have already tried to run our application on a physical iPhone 6s with iOS 11 and everything works.


We read the review again and acording to this sentece "...current submitted version of your app was reviewed on iPad running iOS 11 on Wi-Fi connected to an IPv6 network.", so this problem happened on a IPV6 network and we tested on a IPv4 network. Maybe there is our problem.

so this problem happened on a IPV6 network and we tested on a IPv4 network. Maybe there is our problem.

That’s certainly possible. If you think that’s an avenue worth investigating you should read the Supporting IPv6-only Networks pinned post, and specifically:

  • FAQ #1, which describes how you can test this using your Mac

  • FAQ #6, which links to another post that covers a lot of the gory details here

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

It's possible to do the App Review on a IPv4 network?

Because our server is not configured to work with IPv6.


Thank you inadvance.

Krishnarjun B.


Currently my app uses HTTP service.

When i am running my app in iOS 11 using xcode9 following ATS related error i am getting.


UserInfo={NSUnderlyingError=0x1c4248910 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)"}, NSErrorFailingURLStringKey=myhttp url string, NSErrorFailingURLKey=myhttp url string, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}


Please advice me to avoid this error.

Thank u in advance.

It's possible to do the App Review on a IPv4 network?

That’s something you’d have to negotiate with App Review. I don’t work for App Review and thus can only discuss their published policies, and their publish policy is that apps must work on an IPv6-only network.

Because our server is not configured to work with IPv6.

That shouldn’t be an obstacle. Devices on a DNS64/NAT64 network are capable of connecting to IPv4 servers. That’s covered by FAQ #3 of the pinned post I referenced in my previous response.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

When i am running my app in iOS 11 using xcode9 following ATS related error i am getting …

This issue seems unrelated to the original poster’s issue. I recommend that you start a new thread for this so we can unnecessary cross talk.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Hi All,

I'm having a similar issue with the new 14.5.1 version of iOS. The http request (with IP address) to an external device was working properly for prior versions of iOS (14.4.2 and earlier)

But for iOS 14.5.1 the HTTP request is intermittently and randomly failing. Some of the requests are not even reaching the external device and are blocked by the iOS

I've tried connecting to the external device using the access point network of the device and also by connecting to same Wi-Fi network the external device is connected to
HTTP request intermittently failing if done from iOS 14.5.1. Works on old iOS versions.
 
We’re trying to connect to an external gateway using the access point network of the gateway using http://<ip of the device>/...
 
We used to get a proper response from the device for prior versions of iOS (14.4.2 and earlier)
 
But for iOS 14.5.1 the HTTP request is intermittently and randomly failing. Some of the requests are not even reaching the external device and are blocked by the iOS
 
We also tried calling the same endpoints via Safari browser on the same iPhone (again using ht
 
Steps:
  1.     We first put Envoy/Gateway is in the Wireless Access point Mode

  2.     We got to the Settings screen on iOS device -> Wi_Fi.

  3.     And we connect to the Gateway Wi-Fi

 
We see this behaviour to be Intermittent wherein the HTTP GET APIs fired from iOS to the IOT gateway works on 50% of the times. The rest 50% of the requests gets timed out.
However, the HTTP POST APIs always time out consistently.
Secondly, we see this behaviour to be Intermittent wherein the HTTP GET APIs fired from iOS to the IOT gateway works on 50% of the times. The rest 50% of the requests gets timed out.
 
Troubleshooting steps followed till now:
In the 1st build, we enabled NSAllowsArbitraryLoads to be TRUE. We did not have any luck here
In the 2nd build, We set NSExceptionDomains with the following options. The gateway IP is static and is always 172.130.1.1 and is connected via gateway’s hotspot. In this mode, the iOS data is switched off because the hotspot does not have any internet connectivity.
·      172.30.1.1.xip.io
·      172.30.1.1
And also set NSAllowsLocalNetworking to be TRUE. With all of these params being set, we did not see any improvement in the way APIs are working. The behaviour is explained below

HTTP request intermittently failing if done from iOS 14.5.1. Works on
old iOS versions.

Things have changed a lot since iOS 11, which is the subject of this thread. I recommend that you put your question in a new thread. Tag it with CFNetwork so that I see it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"