7

Does anyone know if it is possible to use MQTT in iOS development like in Android? Is there a library or something?

Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
Nelia
  • 71
  • 1
  • 1
  • 5
  • 5
    possible duplicate of [MQTT client for iPhone](http://stackoverflow.com/questions/5032124/mqtt-client-for-iphone) – Cody Gray - on strike Jan 15 '12 at 12:01
  • You can use https://github.com/nsnick/MQTTClient it supports TLS/SSL – Nick Wilkerson Apr 28 '15 at 04:57
  • There's a good example https://github.com/njh/marquette which uses mosquitto's libraries on iOS – Andy Piper Jan 17 '12 at 21:33
  • These instructions helped me before: http://inote.apptrek.net/2011/10/howto-compile-native-c-codes-to-a-library-for-ios-development-in-xcode-take-mosquitto-for-an-example/ I have not tried marquette yet, but maybe that is the way to go now. – Michael Mar 02 '12 at 06:43
  • You can use [MQTTKit](https://github.com/jmesnil/MQTTKit) . There is an example [here](https://github.com/jmesnil/MQTTExample). – nanospeck Oct 14 '14 at 12:02

1 Answers1

4

Try this. It's much better than mosquitto: The Paho project provides open-source client implementations of open and standard messaging protocols aimed at new, existing, and emerging applications for Machine‑to‑Machine (M2M) and Internet of Things (IoT). The Paho MQTT C Client is a fully fledged MQTT client written in ANSI standard C. It avoids C++ in order to be as portable as possible. A C++ layer over this library is also available in Paho. In fact there are two C APIs. "Synchronous" and "asynchronous" for which the API calls start with MQTTClient and MQTTAsync respectively.

C - http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.c.git Wrapper - https://github.com/relayr/apple-mqtt-example

Henrik
  • 673
  • 8
  • 18
treatheat
  • 41
  • 4