Ken Muse
Decoding Binary Data in Swift

Decoding Binary Data in Swift

In the last post, we started to explore how to create a Decoder and its containers in Swift. Now, we need to have a good way to read the data and provide it back to the decoder so that it can create the type instances. Today’s post will introduce pattern for reading binary data and converting it to Swift types. We’ll then discuss how to integrate it with the Decoder.

Read more

Creating Swift Binary Decoders

Creating Swift Binary Decoders

If we’re going to build a Bluetooth application, we need to be able to decode the data we receive. Swift has a native way to convert encoded data into types – the Decoder protocol. In today’s post, we’ll explore the basics of implementing a custom binary data decoder in Swift. We’ll also look at the different types of “containers” and how they work.

Read more

Creating an Int24 for iOS

Creating an Int24 for iOS

If we’re going to build a Bluetooth app for WatchOS and iOS, we need at least one additional primitive to be available – a 24-bit unsigned integer. Since Swift doesn’t provide that, we’ll just have to create it ourselves. This post will dive into how to create a custom numeric data type in Swift (and how to overcome some limits of the platform in the process).

Read more

Understanding Bluetooth Basics
If we’re going to build a Blutooth-enabled application, the first step is understanding the basics of how data is provided to clients. In this post, I’ll explore some basic terminology and concepts. We’ll then look at how the data is structured so that we can interpret it in our application.

Read more

Swift, Workouts, and Bluetooth Low Energy
I decided that it was time to improve the integration between my treadmill and my watch. First, I upgraded my treadmill with a smart device that provides standardized services using Bluetooth Low Energy. Next, I created an application that integrated everything together. After that, I began this series to make it easier for you to build a Bluetooth-integrated application in Swift.

Read more