an Objective-C native MQTT Framework http://mqtt.org
- mosquitto
- paho
- rabbitmq
- hivemq
- rsmb
- mosca
- vernemq
- emqtt
- moquette
- ActiveMQ
- Apollo
- CloudMQTT
Add MQTTClient.framework from the dist directory to your IOS project or use the CocoaPod MQTTClient
Create a new client and connect to a broker:
MQTTSession *session = [[MQTTSession alloc]initWithClientId:@"client_id"]
// Set delegate appropriately to receive various events
// See MQTTSession.h for information on various handlers
// you can subscribe to.
[session setDelegate:self];
[session connectAndWaitToHost:@"host" port:1883 usingSSL:NO];
Subscribe to a topic:
[session subscribeToTopic:topic atLevel:MQTTQosLevelAtLeastOnce];
Publish a message to a topic:
[session publishAndWaitData:data
onTopic:@"topic"
retain:NO
qos:MQTTQosLevelAtLeastOnce]
Framework build using instructions and scripts by Jeff Verkoeyen https://github.com/jverkoey/iOS-Framework
Documentation generated with doxygen http://doxygen.org
Wrapper | --- | ---- | MQTTKit | Marquette | Moscapsule | Musqueteer | MQTT-Client | MqttSDK | CocoaMQTT |
---|---|---|---|---|---|---|---|---|---|
Obj-C | Obj-C | Swift | Obj-C | Obj-C | Obj-C | Swift | |||
Library | IBM | Paho | Mosquitto | Mosquitto | Mosquitto | Mosquitto | native | native | native |