I am currently playing around with the ZeroMQ messaging framework and iOS. This article describes the challenges encountered when integrating ZeroMQ with my iOS project and how I mitigated them. This resulted in a tool to automate producing a single libzmq static library for i386, armv7 and armv7s architectures.
For the uninitiated, ZeroMQ provides a simple way to pass messages between processes, whether they are local or remote. It can use TCP, UDP, inproc, multicast and several other protocols as the transport mechanism. In the past I have heard ZeroMQ (or ØMQ from now on) referred to as a “sockets framework”. Although this doesn’t capture the entirety of what ØMQ is, it does provide a nice metaphor for my particular use case.
The project that required ØMQ in this instance was a proof of concept for another project I am currently engaged in. The application in question requires two iOS devices to communicate with each other in realtime across a network. ØMQ provides the communication layer, coupled with Apple’s Bonjour zero config network discovery protocol. As ØMQ is a C based library, integrating it with an iOS project should require relatively little effort. Obtain the libzmq source, compile and add to the Xcode project. But as it turned out, producing a static library for iOS development took some additional effort.