discussions-and-proposals icon indicating copy to clipboard operation
discussions-and-proposals copied to clipboard

Switch from Deprecated Networking APIs to Network Framework

Open rplankenhorn opened this issue 2 years ago • 0 comments

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

rplankenhorn avatar Jul 05 '22 15:07 rplankenhorn