Real-Time Heart Rate Monitoring for iOS

A complete implementation showing how to connect to Bluetooth health devices and display live vital sign data in SwiftUI.

The Problem

Connecting to Bluetooth Low Energy (BLE) health devices requires understanding CoreBluetooth’s complex delegate patterns, GATT services and characteristics, and the specific Bluetooth specifications for health data. Most tutorials only cover discovery without explaining how to actually retrieve meaningful data.

The Solution

This complete iOS application demonstrates the full BLE communication pipeline:

  • Device Discovery - Scan for and identify nearby BLE devices
  • Connection Management - Establish and maintain stable connections
  • Service Discovery - Find available services on the peripheral
  • Characteristic Discovery - Locate data-providing characteristics
  • Data Retrieval - Extract heart rate and blood oxygenation values
  • Real-Time Display - SwiftUI interface showing live readings

The Benefits

  • Save 25-40 hours of Bluetooth specification research
  • Complete working example - not just code snippets
  • Adaptable pattern for any BLE device (heart rate, glucose, blood pressure)
  • Modern Swift/SwiftUI implementation
  • Tested hardware - Medisana PM100 Connect (adaptable to other devices)

Technical Highlights

Using CBCentralManager and CBPeripheralDelegate, the app:

  1. Scans for BLE peripherals
  2. Connects to the target device
  3. Discovers service UUID 1822 (Pulse Oximeter)
  4. Reads characteristic 2A5F (PLX Continuous Measurement)
  5. Parses byte array for heart rate and SpO2 values

What You Get

Complete Xcode workspace with fully functional heart rate monitor iOS application. Production-ready SwiftUI interface included.


Ready to build your own health monitoring app?

Get the Source Code