BluKit™ Framework 2.0

BluKit Framework

Today we are proud to announce the release of BluKit™ Framework version 2. Version 2 introduces two big improvements over version 1:

  • Virtual Peripherals
  • API Alignment with CoreBluetooth Framework

Virtual Peripherals

As announced in the BluKit™ Workbench App 2 blog post, Virtual Peripherals are an exciting new feature in BluKit. BluKit Workbench App version 2 is the primary App where Virtual Peripherals can be created and exported to a JSON file. The Virtual Peripheral helps software developers model physical Bluetooth peripherals. BluKit Framework allows software developers to import and develop software against this Virtual Peripheral, even writing unit tests and leveraging Xcode Simulators!

Limitations of Apple’s CoreBluetooth Framework

Many years ago, Apple partnered with the Bluetooth SIG and provided software developers with a software Framework (or API) to facilitate integration of applications with Bluetooth. This Framework is known as CoreBluetooth Framework. With CoreBluetooth Framework and Bluetooth Peripherals, software developers could unlock a whole new class of apps that could interact with thousands of different Peripherals. As years past and more Bluetooth Peripherals emerged including many devices supporting health and fitness as well as Home automation, the demand for quality apps and great user experiences grew.

Unit Testing Leads to Better Quality Software

As any seasoned software developer knows, writing the right unit tests that are repeatable can save countless hours of fixing bugs in released code. A whole new generation of technology emerged to meet this need in the form of CI/CD or Continuous Integration and Continuous Delivery. Underlying these new systems is the premise that with CI/CD comes more timely, predictable, and better quality software. More timely doesn’t equal better quality, so in order to achieve this, writing unit tests to test the important aspects of software became the norm in many development shops. Unit tests are intended to focus on a particular routine or feature in the software and provide simple, repeatable tests that can be run efficiently and quickly with every release. Combined with a CI/CD system, many software companies will run thousands of unit tests with every software commit or even pull request. This allows bugs to be caught very early in the software delivery cycle. They are much easier to fix and much less costly when caught before software is released to the public.

Unit Testing Bluetooth Interfaces

As discussed above, while CoreBluetooth provides a proven API for the software developer building apps for the Apple App Store to interface with Bluetooth Peripherals, CoreBluetooth has limitations specifically around unit testing and Xcode Simulators. So what can a software developer do to improve app quality in the area of Bluetooth integration? Simply put, BluKit Framework 2 introduces support for using Virtual Peripherals with Xcode Simulators. Software developers can write unit tests against a Virtual Peripheral modeled after the real Bluetooth Peripheral. BluKit Framework allows Virtual Peripherals, Xcode Simulators, and Unit Tests to come together to support app quality. Using a CI/CD system with BluKit Framework, Virtual Peripherals, Xcode Simulators, and Unit Tests, software delivery teams can ensure consistent quality and delivery of software including code that interfaces with Bluetooth peripherals!

Simple Migration from CoreBluetooth to BluKit Framework

In version 2, BluKit Framework APIs have been updated to align very closely with CoreBluetooth. Where CoreBluetooth classes begin with “CB”, BluKit drops the “CB”. For example, in CoreBluetooth, the Peripheral class is “CBPeripheral”. In BluKit, it is simply “Peripheral”. This allows software developers to migrate from CoreBluetooth Framework to BluKit Framework version 2 very quickly. In addition, BluKit Framework version is available at the Swift Package Index as BluKit Package for simple integration with Xcode projects as a Swift Package.

BluKit Framework Example App

To see how easy BluKit Framework can be used to build quality Bluetooth apps with Unit Testing and Virtual Peripherals, please see BluKit Example App 1 Github Repo.

Licensing BluKit Framework

To explore licensing BluKit Framework for your own app development, please Contact Sales using the Contact form on our web page.