Skip to content

2.4.0

Latest

Choose a tag to compare

@hjianbo hjianbo released this 30 Jul 13:26
378ecda

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