xcode iphone bluetooth chat between device - iphone

I want to know if there is a framework or method/technique that will allow me to write an iphone/ipad that will allow one device to act as a "Leader" and the other devices as "Followers" in a shared book reading.
For example:
Device 1: Leader
Device 2: Follower
Device 1: opens an book app and turns to page 11
Device 2: opens the same book app and automatically "follows" device 1 to page 11
This sounds like there needs to be some network communication like bluetooth.. Anyone seen this type of thing done?

first search result for 'iphone bluetooth programming' is here

This is precisely the sort of thing Game Kit's peer-to-peer connectivity was created for.

Related

Push-To-Talk (PTT) App using Bluetooth HFP between iPhone and Bluetooth device

We found PTT apps on iPhone store. Now I would like to make one for myself.
For the past 1 week, I have been reading all the posts here regarding how to achieve this in coding. Lets say, we paired the BTdevice with iPhone (The BTdevice supports HFP and A2DP).
When we make a call pressing the button on BTdevice to iPhone, in our iPhone app,
we would like to recognize this EVENT or data in the app, then route the audio to iPhone-speaker.
When the button on the BTdevice released, user presses on-screen Button on iPhone to speak to BTdevice. The audio should be routed to BTdevice speaker.
Please through some procedure to achieve this in coding. Also libraries, classes and samples if available.
I understood this application can be achieved without MFi NDA with apple as HFP and A2DP are open in Apple ( I do understand the documentation available is limited).
I have found the following post EXACTLY addresses what I'm trying. Please take a look.
Intercom with Bluetooth headset
My experience has been, and as your link indicates, pairing with Bluetooth connects the microphone and speaker of one device as dedicated input/output pair for another device, so you can't mix and match a microphone on one end with a speaker on the other.

How can I connect an iOS device to non iOS device (Arduino devices) via Bluetooth?

After searching on Google, I found that people say it's only possible to connect an iOS device with a non iOS device with the 'MFi program'. Is that true?
My project is mainly focused on sending and receiving information with the Arduino device via Bluetooth directly.
Is communication between iOS and non iOS devices without jailbreak possible? If yes, is there a reference?
(I viewed Stack Overflow question How can an iPhone access another non-iPhone device over wireless or Bluetooth?.)
As I stated in the above-linked question, general Bluetooth communication to external devices on non-jailbroken iOS devices is restricted to MFi-compliant Bluetooth hardware.
However, newer iOS devices (iPhone 4S, new iPad) are capable of Bluetooth 4.0 LE communication with external devices without the need for those devices to be MFi-compliant. This interaction is done through the new Core Bluetooth framework, which lets you send and receive arbitrary data to and from Bluetooth LE devices. This only works with those listed newer iOS devices, though.
Tim points out an interesting hack that you might be able to get away with in making your device appear like a Bluetooth HID keyboard. Devices like this barcode scanner have special modes to appear as HID devices to iOS. You might be able to pull something together based on this, but all data transfer will be one-way from your device, and it looks like this will require entering that data into text fields as if you had a keyboard connected.
Alasdair Alan's "iOS Sensor Apps with Arduino" is a good resource to look at. I've used Wifi with another microprocessor (mbed) but not sure about bluetooth. Alasdair is active on Twitter and he usually is kind enough to answer questions.

iPhone Bluetooth Communication Examples

I've been trying to find examples on communicating with bluetooth devices on iOS and have been coming up short. As I understand it SPP is not yet supported. At the simplest level, I'd like to send a simple 1 or 0 signal to the bluetooth device I'm creating. (It's a bluetooth switch that would turn something on and off). Is there a way to cleverly do this through the HID or HFP profiles?
The short answer to your question is that you can't connect to an arbitrary Bluetooth device you may happen to have, you can only connect to a Bluetooth device that has come through Apple's licensing program (i.e. the "Made for iPod/iPhone" label). From Apple's documentation:
Q: [The External Accessory framework allows] my application to communicate with Bluetooth devices. So why doesn't my application see the Bluetooth accessory sitting next to my iPhone?
A: The External Accessory framework is designed to allow iOS applications to communicate only with hardware accessories that are developed under Apple's MFi licensee program.
So there is no public API for accessing an arbitrary Bluetooth device from within iOS: you have to go through the External Accessory Framework to communicate via Bluetooth, and the EAF's mission is "communicate with MFi devices," not "communicate with arbitrary external devices." A sufficiently ingenious developer could probably hack something in there, but -
it's a non-trivial undertaking
you are spectacularly unlikely to get past the App Store approval process
So there's just not much percentage in it - the effort of doing so is unlikely to reward you.
If there already exists an MFi device that can be coerced into doing something that you want, that's probably your best chance - short of going through the MFi approval/licensing process yourself, of course. If you want to do so, have at it and good luck.
I'm answering this question late because Zeroxide's answer is incorrect (you can use a random Bluetooth keyboard with your iOS device because Apple implemented that connection, which is different from giving you a public API path to doing likewise) and I find Rokridi's answer to be incomplete-though-headed-in-the-right-direction.
Edit: A caveat has since been added to the linked Apple page about Bluetooth Low-Energy devices. So there's a loophole, but it's not a big one because very, very few Bluetooth LE devices have actually been produced as yet.
As far as i know, if your external device is non iOs device then you should use External Accessory Framework to communicate your application with it. Threfore, you external device should be certified by Apple through the Made for Ipod program (MFI). Hope this helps.
If you want to use classic Bluetooth (not BLE), then you have to first PAIR the iOS device to the Bluetooth device (in Settings). If you can't do that then you can't communicate with it with your app.
NO. whether device is MFi certified or not, you can connect device to iphone if bluetooth profile is HFP, or HID's (ordinary profiles. not iAP profile). Think about bluetooth headset or keyboard. does it need MFi mark on it to use? NO. Never.

How to launch an iphone app when an external accessory is either paired over BT or plugged into dock connector

I have researched this to death online and cannot find anything regarding auto launching an iphone app when an external accessory is either paired using BT or plugged into the dock connector.
We are an MFi developer with a BT accessory and application that we would like to launch when paired. We have the Info.plist containing our protocols and the device containing the correct protocol all working and communicating. The application works well with our BT device, however I would like to see the app launch when paired.
I have seen this before with accessories plugged into the connector and would live to know how that is accomplished.
http://www.metacafe.com/watch/5772611/ces_2011_withings/
Check at 3:15 in the video.
Does iPhone just have that ability for dock connected items to auto start?
I know that the External Accessory framework registers the protocol with the iPhone when the app is installed. This is how the iPhone/iPod knows to take you to the apple store when you connect a BT (or connector) device and you don't have an app for your connected devices protocol.
I don't understand why the app does not launch when paired, I would think this would be a no brainer. Can someone please shed some light on this topic. The best I found is from Apples docs:
Applications that are able to communicate with an external accessory should declare the ?protocols they support in their Info.plist file. Declaring support for specific protocols lets the system know that your application can be launched when that accessory is connected. If no application supports the connected accessory, the system may choose to launch the App Store and point out applications that do."
I cannot understand the meaning by "may choose to launch", does this mean is also chooses to launch? Please help.
The manufacturer of the device needs to include support for this feature at the firmware level. The details of this process are currently confidential by way of the MFi (Made For iPhone/iPod) non disclosure agreement, so unfortunately that is all the detail I can provide. Good luck!

Is it possible to output video of my iPhone application running on a device?

I am working on an app for a client where he will be showing it in a board from to a group of directors for a serious presentation. Because the iPhone is so small, it wouldn't make sense to have him demo the app on the actual device because no one would see anything.
Is it possible to have the screen output on a computer or tv so that everyone in the room can see what is going on?
http://dragonforged.com/DFVideoOut.shtml
For outputting video off an App from the iPhone/iPod.
Demo of the software http://www.youtube.com/watch?v=upfTZRlszJo
UPDATE: The AV cables described below will not work. Apple only enables TV output for YouTube, iPod Video and iPod Photos.
From Apple's support site:
All you need to get TV out is a compatible iPod or iPhone and the correct cable. If your device works with the component and composite cables, then the choice depends on the TV(s) you will be connecting to.
You need either the Composite AV Cable or the Component AV Cable. Both cables connect to the iPhone's dock connector.
Not unless you're Steve Jobs.
Use the emulator to demo the app via a laptop.
Then pass around an iPhone for the 'hands on' time.
If it's not a phone app, but suitable for the iPod touch, then buy a dozen of them to pass around as demos.
Its not exactly what you want but:
www.projectaphone.com
You cant pass the phone around, but in reality - you need to see the finger interaction anyways.
I wonder if an overhead projector would work - with the projector light turned off of course. Maybe the light emitted from the iPhone would be sufficient in a dark room?
You could demo it on the simulator.
Some applications for jailbroken iPhones exist to let an AV cable work in any application. The ones that come to mind are iPhone-TVOut (http://code.google.com/p/iphone-tvout/) and ScreenSplitr.