views:

467

answers:

5
+1  Q: 

bonjour for iphone

Hello,I would like to know whether bonjour is a public or private api?Can we use it in our apps directly.

+3  A: 

Yes, Bonjour is all public. There are many apps on the App Store that use it.

Ole Begemann
+3  A: 

Apple even has an example project called BonjourWeb that shows you how to use Bonjour on the iPhone.

Nikolai Ruhe
+1  A: 

The Bonjour API seems to be open, however it does belong to Apple and you need to ensure you're correctly licensed. You will likely require a license if you wish to use the Bonjour logo, develop Bonjour enabled applications on Windows, for example.

For further info see: http://developer.apple.com/softwarelicensing/agreements/bonjour.html

Alberto Rossini
No need for a special license in this case. It is included in the iPhone SDK license. If you’re on another platform (like Windows) you could use a non-Apple Zero-Conf implementation.
Nikolai Ruhe
Even on Windows, they are licensing the image freely, as well as the Bonjour name if you satisfy the terms of the agreement (just making sure that your application actually implements Bonjour properly). There isn't a fee associated with any of this.
Brad Larson
+3  A: 

Bonjour is handled by the NSNetServices and CFNetServices APIs, which you can read more about here. These are Cocoa and Core Foundation interfaces, and are publicly available for use in Mac and iPhone applications. As has been pointed out, many applications make use of this to do iPhone - iPhone networking (Game Kit is layered on top of Bonjour, for example) or Mac - iPhone data syncing (such as for Marcus Zarra's ZSync library).

Bill Dudney has created a stripped-down Bonjour server class for the iPhone, which he describes here. I created a matching Mac application which communicates with his test application and can be downloaded from here. Apple's WiTap sample code demonstrates how to use Bonjour to network two iPhones together.

I devoted a section of the class I teach on iPhone development to Bonjour networking, for which the course notes can be downloaded in VoodooPad format here (go to the Networking class for coverage of this).

Brad Larson
A: 

hello ,i would like to publish a service on iphone side using bonjour and use the service provided by iphone on pc side i.e..without any software on pc side..i.e mac pc shud recognise it by using built-in bonjour,and windows by built-in zeroconfiguration.the app is all about communication between iphone and any pc..i would like to know is there any way to do this with out any application on pc side?

sneha