Launch my App following connection with a specific Bluetooth device - ios

I would like my application to be launched by the iOS system when a specific Bluetooth device connects itself to the iPhone.
Do you know if it exists a iOS service for which an app can register itself in order it's launched when a Bluetooth connection is detected ?
Thank you very much for your help
Have a nice day

I think that it has to be written in the bluetooth device, not in the iPhone.
I am developing application with this system, and it's not clearly written in my app. The iPhone check the Array : Supported external accessory protocols only and if it matches with the procotol in the bluetooth device...

Related

Connect iOS App to Bluetooth device not BLE

I want to connect bluetooth device to my iOS app. That device perfectly works in android as it first paired via bluetooth (from outside the app) and send/recive command from inside the app. But that device is not getting in my list when I am turning on it in iPhone setting.
After a research I come to know that Corebluetooth can connect only with BLE. Now How many possible way to connect my app with that device. Please help me with this.
Is there any app on App Store from where I can scan that device ? It
wii be also helpful for me.
I also come to know about apple MFI program, but how will work ? Is it
paid ?
Thanks.

Connect to a backgrounded iOS app acting as a peripheral from a macOS app

I have an iOS and macOS app that make heavy use of Core Bluetooth. The core functionality of the app involves having a central device (CBCentralManager) connect to a peripheral device (CBPeripheralManager), retrieve some data, then disconnect. Either device, whether macOS or iOS can act as either a central or peripheral depending on who needs the data.
At first I thought there was an issue with my code, but after testing the app with two iOS devices, one is able to connect and extract data from the peripheral device even when the peripheral device is locked and the app is in the background. Now according to the docs concerning background advertising on iOS under "The bluetooth-peripheral Background Execution Mode" this is kind of expected:
...they can be discovered only by an iOS device that is explicitly scanning for them.
Is there any way to have a macOS app discover peripherals even when they're backgrounded? I'm sure the code I've written is correct because it's the same across iOS and macOS.
Update 1
I believe that this might be possible just unsure how to approach the issue. Using Apple's Bluetooth Explorer on macOS, I am able to find the desired device AND I'm able to see and read data for my custom service.
This finding is validated from logs from my iOS device about the read requests which are from my peripheralManager(CBPeripheralManager, didReceiveRead: CBATTRequest).

How to get notification when user connects to bluetooth device in IOS settings?

sorry for my bad english
I am developing an app on IOS 9.2. One of the app functions is to get information about bluetooth devices.
I have already managed to monitor bluetooth devices nearby using CoreBluetooth framework and connect to one of them. It works in background mode too. The problem is how to get notification when user connects to device from IOS settings?
Thanks for any help

Communicating with a Bluetooth Classic device in iOS when the app is in the background?

I'm working on iOS development for a bluetooth peripheral. We want the (already paired) device to connect when a button is pressed on it, and this will cause the app to execute some code. Is it possible for the app to detect that the device is connected, even while in the background?
Also, is it possible for the app to bring itself into the foreground when this is detected? Would I need to be a member of the MFi program to do either of these things?
You will be able to detect that the device is connected in the background using Bluetooth 2.0, however you must include the App communicates with an accessory string under Required Background Modes in the app's plist.
So yes, the first part of your question is doable. However when you say: "We want the (already paired) device to connect when a button is pressed on it", it is important to note that this functionality must be built into the device's firmware. The app can always be searching for it, but the device will not be able to communicate with the phone until it connects. Therefore, the button must wake up the device and signal that it now wants to connect.
For the third part of your question, you will not be able to bring the app into the foreground without the user opening the app.
Btw, CoreBluetooth is the Bluetooth Low Energy framework for iOS. It is completely different from Bluetooth 2.0.
as ttarules told you iphone can't connect automaticly to a paired device.
I don't know what kind of bluetooth receiver have you in your device but generally you can set up a method of "AUTOCALL" that automatically call a paired device (in this case an iPhone).
When you (your iPhone) come around the device it automatically establish a connection!
If you set all the parameters correctly in the bluetooth module you can make sure that the iPhone shows a message like this: "YourDevice would like access to YourApplication" when the connection is established.
this way helps the user to use your application and you can run the code you mentioned above when the app start.

How does iPhone discover an external accessory via Bluetooth?

How does an iPhone know to connect to an MFi device via Bluetooth automatically? Is the Bluetooth on iPhone constantly looking for a device to hook up to? What happens if there are a few MFi (all with Bluetooth support) around?
You import ExternalAccessory/ExternalAccessory.h in your .m file(implementation) so that you can use the libraries that contains the accessory information or get available accessories around. Using this, we can also open a session with the selected accessory.
I'm not sure if you can connect to multiple bluetooth devices that are detected.
The user must go to Settings/Bluetooth or Settings/General/Bluetooth (according to which version of iOS the device runs), and wait till the MFi accessory got discovered by the iOS.
Then the user must manually connect the device for the first time. The accessory usually remembers the pairing relationship and reconnect to the iOS automatically, if the user got so lucky when the bluetooth of iOS is on.
Though I have never tried to played with connection of multiple bluetooth MFi devices, Apple's documents suggested that after iOS 5, it is supported.

Resources