Download Latest Version 2.4.0 source code.zip (348.2 kB)
Email in envelope

Get an email when there's a new version of CocoaMQTT

Home / 2.4.0
Name Modified Size InfoDownloads / Week
Parent folder
2.4.0 source code.tar.gz 2026-07-30 267.3 kB
2.4.0 source code.zip 2026-07-30 348.2 kB
README.md 2026-07-30 1.7 kB
Totals: 3 Items   617.1 kB 0

CocoaMQTT 2.4.0 is the stable, long-term-maintenance baseline for the 2.x architecture. It preserves the CocoaAsyncSocket and Starscream transport architecture while collecting the correctness and compatibility work completed after 2.3.0.

Changes

  • Hardened MQTT 3.1.1 and MQTT 5 reconnect, session, QoS, keepalive, and graceful-disconnect lifecycles.
  • Fixed concurrent publish, callback, delivery, and connection-state races.
  • Added configurable packet-read, socket-write, and WebSocket message limits.
  • Unified TCP and Foundation WebSocket server-trust configuration.
  • Added PEM/DER and PKCS#12 client identities, including mutual TLS over TCP and Foundation WebSockets.
  • Added Swift 6 consumer checks and visionOS compile verification.
  • Retained legacy decoder and ConcurrentAtomic.mutate entry points needed by 2.3 source consumers.

Compatibility notes

  • ThreadSafeDictionary.Iterator now uses a stable dictionary snapshot. Code that explicitly names the previous concrete iterator type must use type inference or the Sequence APIs. Use snapshot() for multi-step indexed access across concurrent mutations.
  • ConcurrentAtomic property assignment and mutate remain source-compatible but now execute synchronously. Mutation closures must not re-enter the same wrapper. Use withMutation when the transform returns a value.
  • Deprecated decoder overloads without an explicit protocol version assume MQTT 5 packet data. Use the explicit overload for MQTT 3.1.1 data.

See the 2.x maintenance policy for the LTS scope and support lifetime.

Thanks for all

Source: README.md, updated 2026-07-30