HTTP/2 support for iOS 8

I tried Xcode 7 Beta + NSURLSession, which already supports HTTP/2 and it works just amazing.


Now I'm wondering, when I release the app built with iOS 9 SDK but with iOS 8 support - will iOS 8 users be able to use HTTP2 ?

Or it will only work for iOS 9 ?

Accepted Reply

But what is bothering me is iOS 8 behaviour.

I'm still confused by your actual issue. I suspect you're talking about this case:

  1. you build an app using NSURLSession

  2. you deploy a server that supports HTTP/2

  3. on iOS 9, this will talk to your server via HTTP/2

  4. on iOS 8, this will talk to your server via HTTP/1.1 or SPDY

  5. on iOS 7, this will talk to your server via HTTP/1.1

Whether this works really depends on your server. Ignoring iOS 8 and SPDY for the moment, consider the iOS 7 case. Here iOS is simply going to open the connection and send an HTTP command. What does your server do in that case? It should handle it correctly, but iOS can't guarantee that.

OTOH, if I read your original question literally, you seem to be asking about this case:

  1. you build an app using NSURLSession

  2. you deploy a server that supports HTTP/2

  3. on iOS 9, this will talk to your server via HTTP/2

  4. on iOS 8, will it send HTTP/2 requests?

The answer here is no: the HTTP/2 support is part of iOS 9, and thus won't be available on earlier OS releases.

OTOH, iOS 8 does have support for SPDY. See WWDC 2014 Session 707 What's New in Foundation Networking for details.

Share and Enjoy

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

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

Replies

Hey,


Unfortunately the connection will fallback to HTTP/1.1 on iOS 8.


- Tom

Tom, are you sure ?

Is there any documentation about it ?

I'm pretty sure they talk about it in this WWDC session. In fact, backwards compatibility with HTTP/1.1 servers is noted on page on page 97 of the PDF.


- Tom


I've seen this WWDC session before, and I believe they were talking about cases when server doesn't support HTTP/2.

Then backwards compability with HTTP/1.1 takes place.


But what is bothering me is iOS 8 behaviour.

But what is bothering me is iOS 8 behaviour.

I'm still confused by your actual issue. I suspect you're talking about this case:

  1. you build an app using NSURLSession

  2. you deploy a server that supports HTTP/2

  3. on iOS 9, this will talk to your server via HTTP/2

  4. on iOS 8, this will talk to your server via HTTP/1.1 or SPDY

  5. on iOS 7, this will talk to your server via HTTP/1.1

Whether this works really depends on your server. Ignoring iOS 8 and SPDY for the moment, consider the iOS 7 case. Here iOS is simply going to open the connection and send an HTTP command. What does your server do in that case? It should handle it correctly, but iOS can't guarantee that.

OTOH, if I read your original question literally, you seem to be asking about this case:

  1. you build an app using NSURLSession

  2. you deploy a server that supports HTTP/2

  3. on iOS 9, this will talk to your server via HTTP/2

  4. on iOS 8, will it send HTTP/2 requests?

The answer here is no: the HTTP/2 support is part of iOS 9, and thus won't be available on earlier OS releases.

OTOH, iOS 8 does have support for SPDY. See WWDC 2014 Session 707 What's New in Foundation Networking for details.

Share and Enjoy

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

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

Tnx a lot, that answers my question perfectly.