react-native-udp icon indicating copy to clipboard operation
react-native-udp copied to clipboard

Does react-native-udp need changes for new iOS 14 Local Network Privacy?

Open thibmaek opened this issue 3 years ago • 16 comments

With iOS 14 Apple introduced the new Local Network Privacy feature which prompts users first that an application wants to interface with devices on the local network.

For now, we are not seeing any prompt with react-native-udp although we're interfacing with the local network by performing device discovery, sending a datagram to the broadcast address of a router (255.255.255.255).

It seems weird that when we interface with UDP at this network level we would not see the prompt. Is this something that needs to be added to react-native-udp?

thibmaek avatar Oct 14 '20 08:10 thibmaek

Also see this issue thread on the CocoaAsyncSocket repository which react-native-udp uses under the hood.

thibmaek avatar Oct 14 '20 08:10 thibmaek

@thibmaek, thanks for the feedback! I don't know if this might be a CocoaAsyncSocket issue or react-native-udp must also update the iOS code. Sadly, I cannot test any iOS 14 device at the moment.

CocoaAsyncSocket is written in Objective-C and it is starting to show multiple deprecation warnings when compiling. I might have to look for another library for the long run. This problem might be fixed by switching to another iOS socket library.

If you find any more relevant info, please post on this issue!

Rapsssito avatar Oct 14 '20 12:10 Rapsssito

Hi, I'll just leave this here, as this contains extremely useful information by an Apple employee concerning the new "Local Network Privacy" behavior: https://developer.apple.com/forums/thread/663858

bitcrumb avatar Oct 14 '20 18:10 bitcrumb

Any update on this?

pedrodlz avatar Feb 08 '23 11:02 pedrodlz

somebody is using this package for ios? is there anything we have to consider?

rt012 avatar Apr 15 '24 16:04 rt012

@rt012 As far as I know, Apple performed some fixes by now, which makes sure that the local network permission alert is properly triggered when using UDP. Apart from that, there's nothing special to take care of.

bitcrumb avatar Apr 15 '24 17:04 bitcrumb