|
楼主 |
发表于 2007-10-24 14:26
|
显示全部楼层
Send files directly from iPhone to anotherPosted Oct 23rd 2007 7:30PM by Erica Sadun; N) n+ n5 T: |$ [* \! Q' i
Filed under: Software, Cool tools, Hacks, iPhone4 ^' l- c; p5 q9 e
Today I spent far too much time again investigating Bonjour zero configuration networking. Starting with my codefrom yesterday, I have now updated SendFile to allow you to share anyfile 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 thename of the file along with its data; I ended up using simple propertylists to send both. Another big hurdle involved Objective-C'ifying theCore Foundation code so that it would run as a separate "mdns" classrather than as part of my main application.
5 n* Z& n& j9 }5 u- X- J/ SIf 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 theother. To switch roles, just quit the app (tap Home) and run it again.: _7 E" v* }: x! q! R
Sowhat next? It would be nice to have some features like passwords andchoosing which file to download. Also, I think I may add the sharing(not the scanning) part to SendSong, if people are interested. I alsoneed to figure out where I messed up in terms of switching fromscanning to sending. I'd like people to be able to do both withouthaving to restart the app./ j$ L* _( e: t9 p& P
Now that I have a relatively easy to use mdns class that can bothsend and receive, I think it would also be cool to start building appsthat communicate with each other, like Chess or Battleship. And, ofcourse, I still want to finish my Push-to-Talk toy. Got other requestsor suggestions? Let me know in the comments.: O7 ~0 L- _6 H9 m4 G, u
Thanks to NerdVana, Chasehx, az1324 and Luke! |
|