Bluetooth Logo

Writing an SDK With Core Bluetooth

This entry is part 1 of 24 in the series Writing an SDK With Core Bluetooth

INTRODUCTION

In the next series of posts, I will walk through designing and implementing a very simple SDK (Software Development Kit), using Apple’s Core Bluetooth API.

Core Bluetooth is Apple’s method for interacting with Bluetooth devices; in particular, with devices that use Bluetooth Low Energy (BLE).

In the latest versions of Apple’s operating systems, Core Bluetooth will also support “Bluetooth Classic.”

SUPPORTED ON ALL APPLE DEVICES

Every Apple device, including Macs, Watches, iPhones, iPads, iPods, and TVs, will support your code, if you use Core Bluetooth.

It’s possible that the new support for Bluetooth Classic in Core Bluetooth will allow you also use “classic” Bluetooth on your devices.

In this initial series, I’ll just cover BLE, but I also want to explore BT Classic, using Core Bluetooth, in future series.

BLE is great, because pairing doesn’t need to be done for every device (it advertises and connects to devices without having to go through a pairing process), but it has limitations, like a very low-bandwidth connection. BT Classic is better for higher-bandwidth connections (such as headphones).

I plan to use this as a platform for further Core Bluetooth exploration.

This first series will simply introduce Core Bluetooth, at its simplest level.

NOTE: Apple does not support “Peripheral Mode” (We’ll cover that later) on Watch or TV, so these will act only as “Central Mode.”

GOING NATIVE

This will be an exercise in writing fully native Apple software. That means that we’ll use Swift, and built-in Apple frameworks (as opposed to technologies like React Native).

IT WILL TAKE A WHILE TO GET TO BLUETOOTH

This won’t just be a course on Core Bluetooth. It will also cover the basics of robust, usable SDK design, and some of the considerations we need to make as we progress through the design and development process.

Let’s get started, shall we?