iOS 15 Safari Set NSUrlSession Websocket ON

James Marx 1 Reputation point
2021-09-24T05:38:25.597+00:00

I'm trying to send WebSocket package on a https website to a C# WebSocket Server, When Safari Experimental Features → NSUrlSession WebSocket is On.
My WebSocket server, can't receive the whole package, does any one facing this problem too, and get resolve?

Windows for business | Windows Server | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Scott B 1 Reputation point
    2021-12-03T18:06:25.993+00:00

    Yes, this is an issue that is occurring in Safari 15 (on any platform: iOS, iPadOS, macOS) due to that "Experimental Feature" being enabled.

    With the release of iOS 15.2 Beta 4 now out, it appears that it will not be resolved soon (i.e., NSUrlSession disabled by default.)

    There are anecdotal reports of other potential solutions but the only consistent one appears to be turning off the NSUrlSession WebSocket option.

    Edit 1: The messages that we are sending (and are failing in Safari 15) are less than 25 bytes.

    0 comments No comments

  2. Nico Verwer 1 Reputation point
    2021-12-29T15:37:34.163+00:00

    To turn off NSURLSession, I found these instructions [https://cockpit-project.org/running/safari] useful, but disable “NSURLSession WebSocket” instead of enable. Maybe this will help others who have problems with websockets on iOS 15.

    Short summary:

    1. Open the Settings app
    2. Scroll down and tap on “Safari”
    3. Scroll down to the bottom and tap on “Advanced”
    4. Tap on “Experimental Features” at the bottom
    5. Scroll down until you see “NSURLSession WebSocket”
    6. Disable “NSURLSession WebSocket”
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.