![]() What is Bonjour Service? and what does it do?ĭon't let the French confuse you. So, here we've compiled everything you need to know about the Apple Bonjour service. You can use it to find other Apple services on a network, connect to other devices like network printers (that provide Bonjour support), or access shared drives. See this picture? It's a picture of my iPod touch.Bonjour on your computer is software developed by Apple that comes built-in with Apple’s OS X and iOS operating systems.īonjour, meaning hello in French, allows for zero-configuration networking between different types of devices. The picture you see is actually a screen shot from my iPod touch. As you can see from the iPod logo, it has no on-board camera. Instead, it's subscribed to a Bonjour service on my iPhone and using its camera instead to take a picture of itself. I just spent most of last night figuring out how to get Bonjour (aka mDNS) running on my iPhone. Bonjour offers configuration-free networking technology. Computers (and iPhones) automagically broadcast their services, which you can then listen for and take advantage of. This has been a long-term project that I've been plugging away at for months. So what makes this exciting? With Bonjour, your iPhone and touch can talk to your Mac. They can talk to printers or to each other. They can browse for available services or provide their own as a server. What I put together was a pair of applications: PicSend and PicListen. These apps allow you to subscribe to a camera on another person's iPhone. Just tell that iPhone to snap a picture and within seconds that picture appears on your own screen. You can download a copy of PicSend and PicListen from my FTP site. This is the server app and needs to run on a unit with a working camera. ![]() Install PicListen on either a touch or an iPhone. It subscribes to the PicSend service and tells the iPhone to snap pictures and send them on over. PicSend has one button that freezes and unfreezes the camera display. When stopped, the live preview ends and a single image displays until you resume. ![]() Tap it to tell the server to take a picture. If you're holding the server you know when someone snapped a picture-you'll hear the camera shutter "click". PictureSharing and PictureSharingBrowserĭon't have two iPhones on-hand? Apple provids two sample code programs that tie right into these utilities. PictureSharingBrowser and PictureSharing both run on the Mac. Browser is the client, PictureSharing is the server. They're using the same Bonjour protocol so if you set your service to PicBrowser, you'll be able to send pictures to your iPhone or see pictures from the iPhone on your Mac. To send a picture to, say, your iPod touch, just drop it into PictureSharing and press Start. PicListen will scan for Bonjour services, find the picture, and display it. Similarly, PictureSharingBrowser allows you to see the pictures you snap on your iPhone. ![]() Normally programming in Bonjour is really easy. That's because Apple offers some fabulous Objective-C classes (like NSNetServices) that take care of most of the messy bits. In the world of Apple, everything that is Cocoa and Objective-C is good and lovely and yummy. Unfortunately, although the Bonjour daemon comes pre-installed on iPhone, the supporting classes did not. That leaves us in the world of Core Foundation. Everything that is CF is bad, and evil, and C++-like, and ssy. Everything you can do in heavenly Objective-C, you can do in evil Core Foundation. I spent hours laboriously porting Apple's CFNetServices samples to iPhone. Sending pictures back and forth between iPhones isn't a huge deal until you realize that you're not limited to pictures. With Bonjour, you can send files, data, sounds, videos, anything that transfers from one computer to another. I'm hoping to adapt the code to work next with sound. Sure, you can do a lot better at Target in terms of buying sub-$400 walkie-talkies, but again we're dealing with baby steps here. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |