assumesHTTP3Capable not working only on some iPhones

Hi,

We are using HTTP3 only and hence using assumesHTTP3Capable for every request. It worked so far but now encountered one iPhone that never honor this flag and always tries to create a connection using TCP:

[tcp] tcp_input [C1:3] flags=[R.] seq=0, ack=2023568485, win=0 state=SYN_SENT rcv_nxt=0, snd_una=2023568484

The request is created like this:

        let url = URL(string: urlString)!
        var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0)
        request.assumesHTTP3Capable = true
        return try await urlSession.data(for: request)

iOS: 16

XCode: 15.3

In what cases iOS CFNetwork would not honor "assumesHTTP3Capable" ? (or how can I find out why?)

I compared the console log from a phone with this problem and another one that works:

good case: (iOS 17.4)

Connection 0: creating secure tcp or quic connection
Connection 4: enabling TLS

bad case: (iOS 16.0.2)

Connection 1: enabling TLS

I.e. the bad case is missing the log line "creating secure tcp or quic connection". Any ideas how this could happen?

We are using HTTP3 only … encountered one iPhone that never honor this flag

So, this phone is unable to talk to your server at all?

Share and Enjoy

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

Sorry about my late reply as I was out for the last week.

So, this phone is unable to talk to your server at all?

Yes, that's correct. We're looking into adding a HTTP/1.1 endpoint in the server as a backup. But that comes with own issues (TLS etc).

Any ideas when / in what cases assumesHTTP3Capable does not take effect?

P.S. the same phone also used to work a few months ago. But we cannot remember what updates have happened on this phone (currently it is running iOS 16.0.2).

Thanks!

Any ideas when / in what cases assumesHTTP3Capable does not take effect?

No.

What do you see on the ‘wire’? I recommend that you use an RVI packet trace, per Recording a Packet Trace, so you see the iPhone’s view of the network traffic.

Share and Enjoy

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

assumesHTTP3Capable not working only on some iPhones
 
 
Q