user2136
user2136

Reputation: 811

file transfer via bluetooth from IPhone app

In my app, i want to send a file to another iOS device via bluetooth.

I don't want to install any app from app store which using bluetooth functionality.

I want to implement bluetooth functionality in my app and once it connected means it would list out available iOS devices ( bluetooth enabled devices ) and send a file to selected device via bluetooth.

Is that possible? I don't know where to start..

Please help in this regards..if any sample code for it means its very helpful to me..

Thanks!!!

Upvotes: 2

Views: 5029

Answers (3)

Basanth
Basanth

Reputation: 747

You can use the iOS CoreBluetooth Framework for this, where you can send any kind of data by converting it to NSData.

You can find Apple's demo project over here -> Demo Project

PS: If you are not dealing with much complexities in your project, then you can also check this powerful library called LGBluetooth by l0gg3r on Github . Its pretty simple!

Cheers!

Upvotes: 3

Bobu
Bobu

Reputation: 115

You have to implement OBEX protocol FTP (File Transport Profile) to pushing / pulling .... files from other device :) It is not easy to do !!

Upvotes: -1

danielbeard
danielbeard

Reputation: 9149

GameKit is probably a good starting point as that supports peer-to-peer connectivity http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html

Not sure if the GameKit api's support sending files, and the documentation had this to say: Note: The largest message size allowed is 87 kilobytes. If you need to send more than that, you must split your data into multiple messages.

Here are some related questions as well: iPhone: Sending large data with Game Kit Send and receive NSData via GameKit Using GameKit to transfer CoreData data between iPhones

Upvotes: 0

Related Questions