Post

Replies

Boosts

Views

Activity

Reply to UDP Listener on iOS 14
@Eskimo, we are also quite interested by a code snippet to trigger the authorization dialog, as we have the same issue than DaveWhipps Our app usually only receive UDP broadcast (no transmit except in a few cases). We have got the com.apple.developer.networking.multicast entitlement, have added it and are signing our app with a provisioning profile including this entitlement. Since then, situation has improved as the UDP packet reception that was not working at all before entitlement granted, it is now sometime working, but unfortunately also sometimes not working (situation seems worse on iOS 14.0.1 than on iOS 14). Most importantly, we never got the authorization dialog displayed and our app does not appear as authorized in Privacy/Local Network. We suspect this may be the cause for this spurious reception issue. As we read in the forums the authorization dialog was only shown when sending data, we configured our app to send data to the local network to try to trigger the dialog, using all below methods: TcpSocket class (using CFStreamCreatePairWithSocketToHost) to connect to 192.168.1.1 on port 80 and send a few bytes (there is a device at this address) using GCDAsyncSocket to connect and send a test TCP packet to same address/port using GCDAsyncUdpSocket to create a UDP socket, enabling it for broadcast, then joinMulticastGroup 224.0.1.0 and broadcasting a test UDP packet on port 80. using GCDAsyncUdpSocket to create a UDP socket, enabling it for broadcast, then broadcasting a test UDP packet on port 80 to 255.255.255.255. and finally reusing the example from Apple article sending multicast packets with NWConnectionGroup to 224.0.1.0 None of the above actions are triggering the authorization dialog, and our app is still not listed as authorized in Privacy/Local Network, with intermittent reception of UDP packets. So, if you could share a code snippet triggering this authorization dialog or otherwise advise us on what could be the issue, this would be great. Many thanks in advance Daniel
Oct ’20