core-bluetooth

Scan, connect, discover GATT services, and subscribe to BLE notifications.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill core-bluetooth-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: core-bluetooth
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swift-ios-skills/skills/core-bluetooth
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill core-bluetooth-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement Bluetooth Low Energy (BLE) communication reliably instead of dealing with Core Bluetooth delegate timing, permissions, and state edge cases.

Core Features & Use Cases

  • Central role (scan + connect): Scan for specific service UUIDs, retain discovered peripherals, and connect only when Bluetooth is powered on.
  • GATT discovery (services + characteristics): Discover services/characteristics, read values, and subscribe to notifications.
  • Peripheral role (advertise services): Publish local services and characteristics using CBPeripheralManager, with optional background operation.
  • Operational robustness: Handle background BLE modes and state restoration after relaunch.
  • Use Case: Create a heart-rate monitor that discovers devices by service UUID, subscribes to notifications for measurement data, and keeps working across app backgrounding and relaunch.

Quick Start

Use the core-bluetooth skill to implement a BLE central that scans for the Heart Rate service (180D), connects to a selected device, discovers characteristics, subscribes to notifications, and updates your UI with parsed measurement values.

Frequently Asked Questions about core-bluetooth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to a BLE peripheral and subscribe to GATT notifications on iOS?

To connect to a BLE peripheral on iOS, scan for specific service UUIDs using Core Bluetooth, retain discovered peripherals, and connect only when the central manager reports Bluetooth is powered on. Once connected, discover the desired GATT service characteristics and subscribe to their notifications to stream data.

Do I need to configure Info.plist permissions for Core Bluetooth background modes?

Yes, using Core Bluetooth background modes requires proper Info.plist usage descriptions. You must declare background BLE modes to keep your app working across backgrounding and enable state restoration for relaunch-on-BLE-event behavior.

How does state restoration work for iOS BLE apps after relaunching?

State restoration in BLE apps allows relaunch-on-BLE-event behavior by wiring restoration delegates. This Core Bluetooth mechanism re-initializes your central manager and reconnects peripherals automatically after the app is terminated and relaunched by a Bluetooth event.

What's the best way to advertise local BLE services as a peripheral on iOS?

To advertise local BLE services on iOS, use CBPeripheralManager to publish local services and characteristics. Ensure you check characteristic properties and handle write types correctly to interact with connected centrals.

Why does my Core Bluetooth central manager fail to scan for peripherals?

Core Bluetooth scanning fails if you do not gate your scan behind the poweredOn state. The central manager must report a poweredOn state before scanning for specific service UUIDs, connecting to peripherals, and discovering GATT characteristics.

How do I read and write GATT characteristic values with Core Bluetooth?

To read and write GATT characteristic values with Core Bluetooth, discover the target characteristics within a service, check their properties, and use the appropriate write types. Ensure strong peripheral retention and correct delegate wiring to receive read and write callbacks.