KozBon: Discovering What is Around You
Not long ago I was tasked with developing a feature for an iOS app. What was this feature? Simple, search for, resolve the address, and connect to a Bonjour-enabled device. The problem, the device itself was still in a prototype stage and was not ready to be tested with the iOS application.
How was I going to test my application? How was I going to ensure that the feature I built would actually support the new device? I was left with no choice but to simulate the Bonjour service. But how?
Before I dive right into my solution let me explain what Bonjour is. Bonjour is a protocol developed by Apple that enables automatic discovery of devices and services on a local network using industry standard IP protocols. Bonjour, also known as zero-configuration networking, makes it easy to discover, publish, and resolve network services with a sophisticated, easy-to-use programming interface. See https://developer.apple.com/bonjour/ for more details.
My temporary solution to the problem: use Node.js NPM’s library to publish a simulated service. For example:
Technically problem solved. But what fun is that?
What if there was an app that made publishing simulated services as well as scanning for other known services easy? I thought why not and thanks to some time off over the holiday season I was able to dig in.
The end result KozBon. KozBon is an iOS app that browses your network for Bonjour services as well as gives the user the ability to specify any additional service they would like to search for.
Say you are developing your own application or device that is publishing a custom bonjour service. How are you going to verify you have successfully conformed to the Bonjour protocol? Currently there isn’t a way for bonjour browsers to scan for each and every possible service on a network. They have a hardcoded library of services to look for. If your service is not in their pre-build list, tough luck. With KozBon, you can simply create your own. The custom service type will be automatically added to the library allowing you to discover your custom published service.
Additionally, KozBon allows for you to publish a simulated service of any type. Want to simulate an Airdrop service? You can. Want to publish a custom service? You can.
Interested in downloading the app? Download the app for free from the App Store at https://itunes.apple.com/ph/app/kozbon/id1193790136?mt=8.
Have any questions or comments, feel free to visit my website at http://kozinga.net