0
votes

I'm developping an application which collect data from some sensors in home to a first mosquitto broker runned on Raspberry PI and bridged to cloud second MQTT broker.

I want to develop the same thing on iOS app so I need to have mosquitto MQTT broker (or another broker) on my iOS app (which will be running on iPhone/iPad).

I'm beginner in iOS land and I don't found anything which talk about INSTALL MQTT BROKER ON iOS (ie to run in iPhone/iPad) but just speaking about MQTT client (it's normal because often this is the normal case).

I have see that is possible to compile C source code of mosquitto on iOS and run it !

Thanks for your help in advance.

Regards, /requinham

1

1 Answers

1
votes

You might be able to run mosquitto broker with NSTask on a jailbroken iPhone. But that is not where it is designed to run. An iOS application has a completely different lifecycle from a normal computer applcation. Also as no mqtt library currently provides a mqtt server API, I feel the notion of replacing Pi with iPhone for this task, is not best way forward.

Of lesser importance is that iOS discourages POSIX sockets(used in mosquitto broker) as it doesn't activate cellular radio(1).