core-bluetooth

Implement BLE central and peripheral roles with Core Bluetooth framework.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill core-bluetooth-trancee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: core-bluetooth
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/core-bluetooth
Command: npx skills add https://github.com/trancee/MeshLink-template --skill core-bluetooth-trancee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill simplifies the complex, state-dependent nature of Apple's Core Bluetooth framework, helping developers avoid common pitfalls like improper state management, memory leaks, and background execution failures.

Core Features & Use Cases

  • Central & Peripheral Orchestration: Provides comprehensive guidance on scanning, connecting, advertising, and hosting GATT services.
  • State & Lifecycle Management: Offers critical patterns for handling manager states, background modes, and state restoration to ensure robust connectivity.
  • Use Case: Use this skill to implement a reliable peer-to-peer messaging link between mobile devices, ensuring stable BLE connections and efficient data transfer while adhering to Apple's strict background execution rules.

Quick Start

Use the core-bluetooth skill to generate a template for a central manager that scans for a specific service UUID and handles the poweredOn state correctly.

Frequently Asked Questions about core-bluetooth

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

FAQPage Schema
How do I implement BLE central and peripheral roles using Core Bluetooth in iOS?

Implement BLE central and peripheral roles by orchestrating scanning, connecting, advertising, and hosting GATT services through the Core Bluetooth framework to achieve stable peer-to-peer device connectivity.

Why does my Core Bluetooth manager fail during background execution?

Core Bluetooth background execution fails without proper state restoration and background mode configuration. You must handle manager states and implement state restoration patterns to ensure robust background connectivity.

How do I discover GATT services and interact with characteristics on iOS?

Discover GATT services and interact with characteristics by implementing Core Bluetooth central role scanning for specific service UUIDs and handling characteristic read, write, and notify operations.

What is the best way to handle Core Bluetooth state restoration for BLE connections?

Handle Core Bluetooth state restoration by implementing state-dependent lifecycle patterns that preserve manager states, ensuring your BLE app recovers reliably from background termination and power-aware interruptions.

Can I manage L2CAP channels with Core Bluetooth for complex data transfer?

Manage L2CAP channels using Core Bluetooth to handle complex data transfer scenarios, ensuring efficient peer-to-peer messaging links while adhering to Apple's strict power-aware guidelines and security-focused pairing protocols.

Do I need to handle CBCentralManagerStatePoweredOn before scanning for BLE devices?

Handle the poweredOn state correctly before scanning for BLE devices. Checking Core Bluetooth manager states is a critical lifecycle requirement to avoid improper state management and memory leaks.