Filed under: Software, Cool tools, Hacks, iPhone
Send files directly from iPhone to another
Today I spent far too much time again investigating Bonjour zero configuration networking. Starting with my code from yesterday, I have now updated SendFile to allow you to share any file in your Media/Documents folder with another iPhone or iPod touch. The hardest part of the effort was trying to figure out how to send the name of the file along with its data; I ended up using simple property lists to send both. Another big hurdle involved Objective-C'ifying the Core Foundation code so that it would run as a separate "mdns" class rather than as part of my main application.
If you want to give this a try, you can download SendFile (version 0.22) from my FTP site. Select a file on one phone or touch and "share it". Then "scan" on the other. To switch roles, just quit the app (tap Home) and run it again.
So what next? It would be nice to have some features like passwords and choosing which file to download. Also, I think I may add the sharing (not the scanning) part to SendSong, if people are interested. I also need to figure out where I messed up in terms of switching from scanning to sending. I'd like people to be able to do both without having to restart the app.
Now that I have a relatively easy to use mdns class that can both send and receive, I think it would also be cool to start building apps that communicate with each other, like Chess or Battleship. And, of course, I still want to finish my Push-to-Talk toy. Got other requests or suggestions? Let me know in the comments.
Thanks to NerdVana, Chasehx, az1324 and Luke!

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


Reader Comments (Page 1 of 3)
Ben Englert said 7:37PM on 10-23-2007
Please publish your code and let us know how you worked around the network stack that was apparently keeping this from working when the rest of us tried it!
Reply
Panda said 7:41PM on 10-23-2007
Holy moly think of the potential for multiplayer games here =D
Reply
Adam Rice said 7:43PM on 10-23-2007
I don't even have an iPhone/touch, but I still want to join the Erica Sadun fan club.
Reply
Mark Bryant said 8:06PM on 10-23-2007
Printing to a Bonjour-shared printer would be incredibly useful.
Reply
Luke said 8:17PM on 10-23-2007
This is awesome.
Please oh please oh please work on PDFViewer some more :).
Man you develop a lot of good stuff.
Reply
Dewey said 8:23PM on 10-23-2007
Erica, is there some way where you or someone else could create something that would add a LEAP wi-fi security setting when choosing a network? Thanks. Sorry if that sentence is a little confusing.
Reply
Frank Furter said 8:23PM on 10-23-2007
I wish it could also say HACK in the RSS feed title. This stuff is all great, but I will not hack my phone (I like when it works).
Reply
Randy. R said 8:29PM on 10-23-2007
This is great. Hopefully by the time you are a full blown version with all the bells and whistles the Apple SDK will have all iphones be opened for your softwares.
Reply
Randy. R said 8:32PM on 10-23-2007
Erica, how about some VOIP projects? That will rock the iphones out there.
Reply
oculos said 8:44PM on 10-23-2007
Erica,
I believe these are the most urgent and needed iPhone capabilities:
1 - MMS
2 - VoIP (a SIP client would be just wonderful)
3 - full bluetooth capability. I'd love to use a BT keyboard, my BT GPS, etc., with the iPhone, specially for GPS logging, sending files via bluetooth to every BT phone, ettc.
4 - international keyboard layouts, more than those available
5 - divx player
Those all would make it the best, period.
Cheers,
oculos
Reply
Michael Rose said 8:41PM on 10-23-2007
Oh man. Bonjour-enabled Battleship FTW!
Reply
mdnetguru said 8:49PM on 10-23-2007
Erica Rocks! Seriously, Pirate (another Erica app) is the reason why I held off updating my phone. I love it. Aargh!
Reply
lowbelly said 9:00PM on 10-23-2007
This would be awesome with sendSong-- but if it could add it directly into the iTunes library, that would be incredible. I've been looking at the MusicLibrary methods, trying to do the same thing for mp3's downloaded from Safari, but I think you could replicate my work in about half an hour. You, sgstair, and loopy are all on my coder heroes list.
Reply
Adam S said 9:00PM on 10-23-2007
Erica,
If you're going to add something to SendSong, how about the ability to send it via Bluetooth??
Reply
momo411176 said 9:01PM on 10-23-2007
Rock on, Erica...you da best!
Reply
junglee said 9:14PM on 10-23-2007
Erica, I think the killer app would be one that adds exchange/push-mail capability to the iPHONE.
Reply
dasilvetz said 11:00AM on 11-20-2007
Hey Erica,
to stay on topip I would say that a PTT app would be amazing.. Nikotalkie is cool and all but VERY slow- not quite usable to have a conversation ala "nextel".. If you pull PTT off I think that would be absolutely phenomenal,
Thanks!!
Reply
kirankonathala said 10:23PM on 10-23-2007
@ Erica : How about the security app using sqlite3db?? Emailing sms, call info automatically (will help in case of lost iPhones).
You rock big time!!
Reply
bluemon said 10:28PM on 10-23-2007
Would be great if this program could be used to send one's AddressBook card to another iPhone. That was one of the things Newton users often did-- "beam" their virtual business cards to one another.
Reply
Oli said 11:08PM on 10-23-2007
how does it send files to other ipods? by e-mail? or bluetooth? It isnt clear so I am curious!
Any chance of an app to add international kb in 1.1.1 thru installer please? as I can't do it myself even though all it involves is a simple change to the plist file as whenever I try it my phone won't start and I need to restore it!
Reply