This week while working on a new iOS app with the DailyBurn crew we ran into some issues with our XMPP server setup and decided that we needed to look at some alternatives. I immediately thought of Faye a great little Pub-Sub messaging server which supports messaging over http long-polling and websockets.
I did some searching online to see if there was an Objective-C library available for Faye and not finding one I decided to take a crack at putting one together.
Faye is based on the Bayeux protocol a for transmitting asynchronous messages primarily over HTTP. It uses JSON messages to handle connection, subscribing and publishing to channels.
Faye has client and server libraries for Node.js and Rack so it was a good fit for our web application stack at DailyBurn.
FayeObjC
FayeObjC is a Faye client library that allows you to interact with a Faye server in both iOS and Mac OS applications. FayeObjC is available on GitHub with full documentation of usage here: FayeObjC on Github.
There are detailed instructions for building and using the library on my github page there is also a fairly comprehensive Mac OS sample app and a simple iOS sample app (which I am currently extending). So if you’re interested in Faye or asynchronous messaging on iOS or Mac check it out.
Working with the library:
Initialize a Client:
Implement the FayeClientDelegate:
-
andrewzielinski reblogged this from cometcoast
-
cometcoast posted this