Filed under: iPod Family, iPhone
iPhone Coding: Bonjour wrapper simplifies iPhone implementation
Man, I wish this Bonjour class wrapper had been around a few weeks ago. The CFBonjour Cocoa class simplifies mDNS/Bonjour programming for the iPhone and iPod touch. iPhone developer Ecume pointed me towards this simple class that allows you to publish and subscribe to Bonjour network services with a minimum of programming. He's using this code to write a DropCopy client for iPhone. Hopefully this new step forward will make it a lot easier for more developers to get on the iPhone/Bonjour wagon--the opportunities go far beyond Zune-like file sharing. (Speaking of Zune-like sharing, my new version of SendSong allows you to squirt your music to anyone using SendFile.)
Thanks to Ecume.


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
starkruzr said 3:37PM on 11-07-2007
Also, I would REALLY like someone to write a "standard" file Save-As and Open class so that things don't have to go into pre-determined directories.
Safari download plugin would be nice too.
Reply
starkruzr said 3:37PM on 11-07-2007
I am REALLY excited about these Bonjour developments. Autodiscovery is a beautiful thing.
When we finally figure out how to make the sound server work without crackly, crappy sound, it'll be great to be able to stream music using something like VLC :) Yes, there are extant browser-based solutions for this, but meh.
Reply
jj said 6:07PM on 11-07-2007
For once can't you just report someone else's work without promoting your own at the same time?
Reply
me said 8:01PM on 11-08-2007
Erica: what is the iphone's bonjour name? Is it "iphone.local" or something? I can't figure it out. If there isn't one, perhaps you could whip up a quick GUI for letting the user set it. Of course we all run Apache on our iphone now right?
-dave
Reply
Matt said 9:39AM on 11-14-2007
How do I get this to build? It seems to require both CoreFoundation and CFNetwork, but if I try to link with both frameworks, the linker (arm-apple-darwin-gcc) complains about certain symbols being defined in two places.
Reply
Matt said 4:33PM on 11-14-2007
Okay, I seem to have fixed that problem with the "-multiply_defined suppress" linker option, but now it is saying that ___eprintf is undefined. Passing -lc to the linker does not help. How do I get this to build?
Reply