discussions-and-proposals
discussions-and-proposals copied to clipboard
Switch from Deprecated Networking APIs to Network Framework
Introduction
On iOS 12, Apple introduced the Network framework to create network connections to send and receive data using transport and security protocols. On iOS 15, Apple deprecated several networking APIs from other frameworks like CoreFoundation
, Foundation
, and CFNetwork
.
Details
By adopting new networking APIs, apps will benefit from modern security features and fixes without additional work.
For more information on this framework, you can watch the WWDC 2018
Introducing Network.framework: A modern alternative to Sockets video.
Discussion points
There may be more places but in particular in RCTSRWebSocket is calling a deprecated function here: https://github.com/facebook/react-native/blob/main/Libraries/WebSocket/RCTSRWebSocket.m#L497. https://developer.apple.com/documentation/corefoundation/1539739-cfstreamcreatepairwithsockettoho