bluetooth in iphone - iphone

Is it possible to send a file using bluetooth programatically ?
Any suggestions or any alternative methods ??
Thanks

I don't think there is an easy way, but see this question for information on various ways to create Bluetooth connections for iPhone.

If you want to connect your iPhone to your own embedded device via Bluetooth have a look at the "Made for iPhone" program.

Related

Communication between two iOS devices

I am looking for a way to have one iPhone app send a message to another app on a different phone (sort of like a Sender-Receiver set up). I am looking for the best possible way to do this. Does anyone have any ideas and/or tutorials?
Thanks for the help.
You should use GameKit. It is super easy to send messages between two iOS devices using it. Here's a great tutorial: Game Kit. You can also get more information about it here from the docs: About Game Kit.
You communicate by creating an ad-hoc bluetooth or local wireless network.
lmirak provided insightful info about device communication(especially about GameKit). I would like to add one more solution. You can use WiFi network to do your device communication.
See the link or download the sample application from developer.apple
The sample application named as WiTap. It demonstrates how to achieve network communication between applications. Using Bonjour, the application both advertises itself on the local network and displays a list of other instances of this application on the network.
If your app is only going to run on iOS, then you should use the fantastic MultipeerConnectivity library. https://developer.apple.com/documentation/multipeerconnectivity
If you need a solution that will work cross-platform, then one way to accomplish this is using sockets and connecting over a local network. On iOS you can use CocoaAsyncPods for sockets and NetService for discovery.
Here is a basic example app that does this: https://github.com/brendaninnis/LocalNetworkingApp
, which I explain in great detail here: http://brendaninnis.ca/connect-nearby-devices-part-1.html

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!!!
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!
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
You have to implement OBEX protocol FTP (File Transport Profile) to pushing / pulling .... files from other device :) It is not easy to do !!

iOS bluetooth without GameKit

I already know that using GameKit, I can only connect to other iOS devices running the same app.
But I want to connect to a Parallaz EasyBluetooth chip to send and receive commands, so I need a different solution. I suppose there are some libraries for jailbroken devices, but I don't know any. Can you give me some names or hints to look for?
Is this maby what you need?
http://code.google.com/p/btstack/

How to access scanner device using wifi in iphone application (same as wifi printer)?

I want to access scanner device in my iphone app via wifi just like printer (as we do for UIPrinterInteractionController)
there are already several apps available on itunes like iPrint&Scan etc.
Please help me out, I get stuck on this.
thanks,
Mrunal
use UISupportedExternalAccessoryProtocols
check this one
http://developer.apple.com/library/mac/#samplecode/SampleScannerApp/Listings/Controller_h.html#//apple_ref/doc/uid/DTS40007644-Controller_h-DontLinkElementID_3
check External accessory framework it will be useful

iphone and bluetooth device

could i connect my nokia phone to iphone using the following Object..?
1)GKPeerPickerController
2)GKSession
i mean (GameKit)
note that here not two iPhone but it is one iPhone other one is only one Bluetooth device..
thanks and regards
jalju
Could you be a little bit more specific about what your purpose is?
Are you trying to create a cross-platform game or simply transferring data between the devices?
Though the documentation clearly states that:
The GKPeerPickerController class
provides a standard user interface to
allow an iPhone to discover and
connect to another iPhone.
So I don't think this is the right way to go.