← スキル一覧に戻る

corebluetooth
by nonameplum
Documentation formatted as skills for AI coding assistants. Includes a DocC converter for creating new skills.
⭐ 9🍴 1📅 2026年1月18日
SKILL.md
name: corebluetooth description: Apple Core Bluetooth framework for BLE and Bluetooth Classic. Use for central/peripheral workflows, scanning, connecting, advertising, GATT services/characteristics, read/write/notify, L2CAP, background processing or state restoration, and error handling across Apple platforms.
Core Bluetooth
What to open
- Use
corebluetooth/AboutCoreBluetooth.mdandcorebluetooth/CoreBluetoothOverview.mdfor concepts and role orientation. - Use
corebluetooth/PerformingCommonCentralRoleTasks.mdfor step-by-step central workflows. - Use
corebluetooth/PerformingCommonPeripheralRoleTasks.mdfor step-by-step peripheral workflows. - Use
corebluetooth/BestPracticesforInteractingwithaRemotePeripheralDevice.mdandcorebluetooth/BestPracticesforSettingUpYourLocalDeviceasaPeripheral.mdfor pitfalls and best practices. - Use
corebluetooth/CoreBluetoothBackgroundProcessingforiOSApps.mdfor background modes and lifecycle constraints. - Use
corebluetooth/corebluetooth.mdfor API quick maps and symbol lookup.
Workflow
- Identify whether the app acts as a central, a peripheral, or both.
- Wait for the manager state to be
poweredOnbefore issuing BLE operations. - Follow the role checklist to keep discovery and connection order correct.
- Open the role task guide and best practices first; use the API reference for exact signatures.
Central checklist
- Create a
CBCentralManagerwith a delegate and queue. - Handle
centralManagerDidUpdateState(_:)and gate scanning on.poweredOn. - Scan with
scanForPeripherals(withServices:options:)and stop when the target is found. - Connect, set the
CBPeripheraldelegate, and discover services and characteristics. - Read, write, or subscribe to characteristic notifications as needed.
Peripheral checklist
- Create a
CBPeripheralManagerwith a delegate and queue. - Wait for the state to become
.poweredOn. - Define services and characteristics, then add them to the manager.
- Start advertising with service UUIDs and optional local name.
- Respond to read and write requests; publish updates to subscribed centrals.
Reminders
- Retain discovered
CBPeripheralinstances to keep them alive. - Use notifications for streaming data; use write-without-response only when
canSendWriteWithoutResponseis true. - Use L2CAP only for use cases that do not fit GATT characteristics.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です