A Swift NIO MQTT v3.1.1 and v5.0 Client

What's New



Patch Release Changes

  • Fix reference cycles in listeners that reference the MQTTClient by clearing listeners in the shutdown call.
  • Fix re-entrancy issue with listeners locking access to listeners when running notify.
  • Make MQTTListeners a final class.


sswg:sandbox|94x20 Swift 5.7

A Swift NIO based MQTT v3.1.1 and v5.0 client.

MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol that was developed by IBM and first released in 1999. It uses the pub/sub pattern and translates messages between devices, servers, and applications. It is commonly used in Internet of things (IoT) technologies.

MQTTNIO is a Swift NIO based implementation of a MQTT client. It supports

  • MQTT versions 3.1.1 and 5.0.
  • Unencrypted and encrypted (via TLS) connections
  • WebSocket connections
  • Posix sockets
  • Apple's Network framework via NIOTransportServices (required for iOS).

You can find documentation for MQTTNIO here. There is also a sample demonstrating the use MQTTNIO in an iOS app found here


  • Swift Tools 5.6.0
View More Packages from this Author


Last updated: Thu Mar 30 2023 04:23:24 GMT-0500 (GMT-05:00)