App-to-app communication with Bonjour

Last time I wrote about my plans for Degrees's level editor. I wanted the editor to act as a server so the game could be used to preview the level live. So I needed my iOS app and Mac app to communicate and send Cocoa objects over wifi, preferably with no configuration. Bonjour came to mind, and I set to work learning about it and implementing a client-server system.

It works! The level editor can push a new level to the game at will, and in about a second the level appears on the screen. Animation never skips a beat. I'll be able to make minor adjustments to the level and test them out without a huge load cycle. This also works with multiple simultaneous clients.

As a result of all this, I've produced a library of classes that you can use to set up communication between Mac and/or iOS apps with very few steps. You just need to get the files from Github, drop them into your app, and then follow the instructions.

I gave a talk at a local meetup about all of the above. The organizer was kind enough to post a video of the talk. You can also get my Keynote slides.

(If you've watched the talk, you'll notice that I said there was a major flaw in KCSession. That has since been fixed, so go nuts.)

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (12)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    Wonderful Web site, Carry on the beneficial job. Thanks a lot.
  • Response
    Response: website
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Response: deluxe mahjong set
    Degrees, a game in progress for iPad and iPhone - Development Blog - App-to-app communication with Bonjour
  • Response
    Can I just say what a aid to find somebody who actually knows what theyre talking about on the internet. You undoubtedly know learn how to convey a difficulty to mild and make it important. More individuals have to read this and perceive this facet of the story. I cant believe ...

Reader Comments (1)

Thanks for sharing the useful article and the Github files.

January 20, 2015 | Unregistered CommenteriPhone Developer

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
« Degrees project history | Main | Level editor design »