React native UDP does not send any messages from iOS, anybody made it working?

Viewed 263

I am trying to use react-native-udp but it does not work on iOS. It's fine on Android, but on iOS it does not send any messages. The app asks for permission once installed, but does not work even if having permissions. Anybody can make it working on iOS?

Code sample

const socket = dgram.createSocket({
        type: 'udp4',
        debug: true,
    })
    socket.bind(BROADCAST_PORT)
    socket.once('listening', function () {
        socket.send(MSG, undefined, undefined, BROADCAST_PORT, BROADCAST_ADDR, function (err) {
            if (err) console.log("ERR:"+err)
        })
    })
  • iOS - 14.3
  • react-native - 0.63.4
  • react-native-udp - 4.1.2
0 Answers
Related