This guide will show you the basics of developing your own Bluetooth Low Energy (BLE) app using the Core Bluetooth Framework in Xcode.
You'll need a basic understanding of Swift, but no prior experience with Bluetooth Low Energy is required. The example code provided in this guide can be applied to both iPhone and iPad users running the current version of iOS.
For this guide I'll be using the Adafruit Feather 32u4 Bluefruit LE to send and receive data.
Before you begin, know that the Simulator in Xcode isn't capable of using Bluetooth LE services. You'll need to follow along using an iPhone or iPad running the most current version of iOS (Version 14+).
Since you'll need to test your app using an iOS device, you'll also need an Apple Developer membership (please note that free membership enrollment is fine for following along with this guide). If you need help getting started as an iOS developer, check out the Adafruit guide covering how to enroll to the Apple Developer program and gain membership:
- Install Xcode. Click here to download Xcode from the Apple App Store.
- Make sure your version of Xcode is up to date. I'm using Xcode Version 12.4 at the time of making this guide.
- While in Xcode make sure the Development Target is 14.0 or higher.
- Download the Arduino IDE from the main website here if you haven't already.