views:

104

answers:

1

can anyone give me sample code to transfer photos from one iphone to another using bluetooth

+1  A: 

Your best bet would to use GameKit, which greatly simplifies connecting multiple devices over Bluetooth & transfering data. I can't remember having seen an Apple sample which does that, but it certainly would be possible. This is exactly what GameKit was intended for, peer-to-peer connectivity, not only limited to gaming.

You'll probably have to split the data of the image and send little chunks to the other device, which can reassemble the chunks to form the original file once finished.

http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/GameKit%5FGuide/Introduction/Introduction.html

Yannick Compernol