BLE pheripheral not detected when ios app on background - ios

i am develop a ble based iOS application on iOS 8.0. i have a peripheral device, that advertise data . am just open my application , the scanning started on viewdidload. then it detect the peripheral and listed in a table view. it is working fine. but when am switch off the peripheral device, after am start the iOS app, scanning started on didload, and am pressed center key, then app going to background. after am just switch on peripheral device. but it could not detect the device.
(current situation, am switch off and on the bluetooth of an iOS device manually. then background app detected the peripheral and got notification message.)
what is the actual problem with my app? and if any solutions?

Make sure you have enabled the proper background mode in the target capabilities page. Go to the Capabilities tab for your target and switch "Background Modes" to ON, the check "Uses Bluetooth LE accessories".

Related

Can anyone give me an idea of how a bluetooth device like silent beacon can send a command to the phone while the screen is closed

I am talking the silentbeacon.com personal safety alarm device. How is it able to connect with the phone with bluetooth while the screen is locked. I am looking for an IOS solution.
Just because the screen is locked on the iOS device doesn't mean it cannot do any Bluetooth functionality. iOS devices have a special background mode that allows them to continuously read BLE adverts and also communicate with remote BLE devices. You can find more about this here:-
CoreBluetooth background processing for iOS apps
BLE device keeps connecting with iPhone when app terminates
iOS - BLE scan and connect to peripheral in background

Does iOS scan beacon even if bluetooth is off

I am developing app which interacts with iBeacon. I've seen my app is able to detect iBeacon even if bluetooth is off. I am unable to find any documentation of this behaviour. Can anyone share official verdict/documentation what actually is going on behind the scene?
Thanks
When you tap the Bluetooth icon in Control Center to turn it “off” the icon changes from Blue to Grey, but this does not turn off Bluetooth. It just disables Bluetooth connections while allowing iBeacon scanning and scanning for other Bluetooth devices to continue.
You can verify this for yourself by turning the Bluetooth icon to the off position in Control Center like this:
Then drill down into settings to see that the Bluetooth switch is still enabled but below that connections are now disabled.
You cannot detect if a phone is in this state, but if your app constructs a new CBCentralManager when the phone is in this state, iOS will automatically put up a dialog like this:
If you are not using CBCentralManager, then it doesn't make any difference whether the phone is in this state or not -- you can scan for other devices (iBeacon using CoreLocation or non-iBeacon bluetooth devices using CoreBluetooth) the same way regardless of whether the phone is in this mode.

Detect Bluetooth device connect/disconnect in background using core bluetooth in iOS programmatically

I need to programmatically detect the connect and disconnect event of any bluetooth device with iPhone, while app is in background.

Bluetooth device connection

I am using Bluetooth device to send some information to my app. Whenever i am double clicking bluetooth device it should launch app and should display a particular screen. If app is in background or terminated or active it should display that particular screen after clicking by bluetooth device. If you have any idea please help me.

ios background task notification for BLE devices

I'm developing a "background task enabled" app that connects to a BLE (bluetooth low energy) device. The user opens the app and connects to the BLE while the app is in the foreground. Once the app goes to the background it will keep communication open with the device (if in range) and be alert of any information received from such device. Now my question is how do I handle or even notice that data is coming from the device? It seems that right now my notifications are queued and are only shown when I manually bring the app to the foreground.
Thanks,
Andres N.

Resources