BonjourDevAPIFinder is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BonjourDevAPIFinder"
To run the example project, clone the repo, and run pod install from the Example directory first.
BonjourDevAPIFinder uses Tweaks.
You need to make sure Tweaks have a way to be opened (see Tweaks docs).
Anywhere in your project, before using an api address execute:
[BonjourDevAPIFinder.sharedInstance addApiService:@"API server"
identifier:@"example"];
identifier is the Bonjour advertised name for your service.
To retrieve currently chosen API address use:
[BonjourDevAPIFinder.sharedInstance apiAddressForIdentifier:@"example"
defaultAPIAddress:@"api.example.com"];
That's it!
Tip: you can add more than just one address.
var mdns = require("mdns");
var ad = mdns.createAdvertisement(mdns.tcp(advertisedName), port);
ad.start();
Sample Bonjour-enabled node server project attached in the Server Example folder.
Tomek Kopczuk, tkopczuk@gmail.com
BonjourDevAPIFinder is available under the MIT license. See the LICENSE file for more info.

