-1

I am trying to implement send messages from the apple watch to an MQTT server using the MQTT Paho client library.

I am able to send messages from the emulator to the server but I am receiving errors when I try to run the app on an actual watch.

I am getting an error saying that it has attempted to connect to the server 3 times followed by "Socket: 5 Err: -1 Ernno: 1 Operation not permitted".

Joy
  • 19
  • 1

1 Answers1

0

BSD sockets are not supported on watchOS (though I'm not sure why they work in the simulator). In watchOS 6 you'll be able to use Network.framework, but there aren't any MQTT libraries written using that yet. (I've started my own but it isn't usable yet.)

Jon Shier
  • 12,200
  • 3
  • 35
  • 37