Boost ***** 1.86.0 on iOS 18.3.1 connection times out

We use Boost ***** (1.86.0) for WebSockets in an iOS application using a self-signed certificate.

The ***** WebSocket client works fine on iOS 18.1 and every other OS (Windows, Android, Linux, etc...) but not iOS 18.3.1 and possibly versions before 18.3.1 but later than iOS 18.1.

Has anyone else ran into this issue and how did you resolve?

What could have changed after iOS 18.1 that would prevent a WSS Websocket from connecting that works fine on iOS 18.1?

Answered by DTS Engineer in 829043022

OK, but that doesn’t help me help you. You have three choices here:

  • You can dig into this yourself. That’s one of the nice things about using an open source library.

  • You can file an issue with the library’s developers.

  • You can file an issue with Apple. See Bug Reporting: How and Why?

I can help you with the first option, but only insofar as it touches Apple APIs. If you boil this down into a specific API that’s failing, or has just changed behaviour, I’d be glad to look at that. But I can’t debug this open source library for you. From DTS’s perspective, this is your code.

Share and Enjoy

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

We're using Xcode 16.2

I think you're referring to Boost . B e a s t, right?

Is that a profanity in Cupertino? Weird.

How exactly does it fail? Do you have other ASIO code in the app, and does that work?

Written by endecotp in 828437022
Is that a profanity in Cupertino?

Apparently so )-: I’ve raised this with the relevant folks.


Written by DSP360 in 776188021
What could have changed after iOS 18.1 that would prevent a WSS Websocket from connecting … ?

I can’t think of any good reason for this. However, I suspect that this library is based on BSD Sockets, and there are many ways to use BSD Sockets wrongly, resulting in weird behaviour like this. If you’re curious, this is covered in some detail in TN3151 Choosing the right networking API.

Someone is going to have to debug this code to see why it’s failing. Given that this is open source, that can be you, or you can escalate this via the support channel for that library.

Either way, I think it’s important to answer this question:

Written by endecotp in 828437022
How exactly does it fail?

You said “connection times out”, but that’s a very high-level description of the problem. What do you see on the ‘wire’? And what Apple APIs is the code calling that then fail?

Share and Enjoy

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

I suspect that this library is based on BSD Sockets

It uses kqueue:

https://github.com/boostorg/asio/blob/develop/include/boost/asio/detail/kqueue_reactor.hpp

Yes Boost Beast for an async websocket connection.

OK, but that doesn’t help me help you. You have three choices here:

  • You can dig into this yourself. That’s one of the nice things about using an open source library.

  • You can file an issue with the library’s developers.

  • You can file an issue with Apple. See Bug Reporting: How and Why?

I can help you with the first option, but only insofar as it touches Apple APIs. If you boil this down into a specific API that’s failing, or has just changed behaviour, I’d be glad to look at that. But I can’t debug this open source library for you. From DTS’s perspective, this is your code.

Share and Enjoy

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

Accepted Answer

This problem was resolved by using boost-1.87.0.

Boost ***** 1.86.0 on iOS 18.3.1 connection times out
 
 
Q