What is Core Bluetooth?
Core Bluetooth is Apple's framework that lets an app talk to Bluetooth devices, mostly the low-energy kind: heart-rate straps, sensors, smart lights, toys and other gadgets. The iPhone usually acts as the central, scanning for nearby devices, connecting to one and reading or writing the values it offers. An app needs the person's permission before it uses Bluetooth.
More about Core Bluetooth
A Bluetooth gadget describes itself as services, each holding characteristics: a heart-rate strap offers a heart-rate service whose measurement changes with every beat, and an app can ask to be told each time it does. Apple's central manager starts scanning only once Bluetooth is on and available, and an app can also play the other side, a peripheral that other devices connect to. Without its usage message, Apple warns, an app that touches Bluetooth crashes.
An example
A workout timer that reads a chest strap makes it concrete. Tap Find my strap, and the app scans for devices offering the standard heart-rate service, lists the one it finds and connects. From then on each new reading arrives as the strap sends it, and the timer screen shows beats per minute in large numbers beside the interval clock, turning red above the zone the person set.
A common misunderstanding
Not every Bluetooth gadget can be read by any app. Standard kinds, such as heart-rate straps, follow a published profile; many others speak a private language that only their maker's app knows, and without its details an app can connect but make no sense of the data. Headphones, speakers and keyboards are another case again: the iPhone pairs with them in Settings, and apps use them as sound and typing, not through Core Bluetooth.
In a Borel app
Bluetooth is a feature you build in the preview and try on a real phone. The iPhone in your browser has no Bluetooth, so a Borel app says so on screen there, while its other screens, lists and settings work as usual. With the gadget beside you and the app on a real iPhone, scanning starts when you tap to look for it. Once the app is published, it works the same on every phone that downloads it, as long as the gadget speaks a language the app knows.
Core Bluetooth with Borel
Describe the gadget and what the app should do with it, and Borel writes the Bluetooth part in Swift with Core Bluetooth: it starts looking when the person taps, and asks for Bluetooth in its own words. On Pro, Borel Companion puts the app on your iPhone to try it with the real device.
Sources: Apple Developer: Core Bluetooth; Apple Developer: CBCentralManager; Apple Developer: NSBluetoothAlwaysUsageDescription. Checked .
Related terms
Make your iPhone app in Borel
Describe it in your own words. Borel writes it in Swift, builds it on its own Mac and puts it on your iPhone.