Can an app receive bluetooth data if it is locked?

1k Views Asked by At

Simply that question. You see other devices stating that they can, but built on older platforms. Any sample code would be great.

1

There are 1 best solutions below

1
On

Yes, it is possible. You need to set UIBackgroundModes to "bluetooth-central" in info.plist file.

Note also, that Technical Q&A QA1657 in iOS Developer Library says the following

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. MFi compliant accessories can be implemented as wired devices, meaning they plug in to the iOS device's 30-pin connector, or as wireless devices, whereby they use Bluetooth as the communication channel. Either way, an application that uses the External Accessory framework will not be notified of an accessory's presence unless the accessory identifies itself as being MFi compliant, i.e., it was specifically designed to interface with an iOS application.

Developer reference also says that there is a Core Bluetooth framework for Low Energy devices in iOS5, but it's for Bluetooth 4.0 devices (BTLE) only, currently on the iPhone 4S.