{"id":"f89b9d46-471e-498d-a67a-ab94ba4e881b","shortId":"k7uwcW","kind":"skill","title":"Core Bluetooth","tagline":"Swift Ios Skills skill by Dpearson2699","description":"# Core Bluetooth\n\nScan for, connect to, and exchange data with Bluetooth Low Energy (BLE) devices.\nCovers the central role (scanning and connecting to peripherals), the peripheral\nrole (advertising services), background modes, and state restoration.\nTargets Swift 6.3 / iOS 26+.\n\n## Contents\n\n- [Setup](#setup)\n- [Central Role: Scanning](#central-role-scanning)\n- [Central Role: Connecting](#central-role-connecting)\n- [Discovering Services and Characteristics](#discovering-services-and-characteristics)\n- [Reading, Writing, and Notifications](#reading-writing-and-notifications)\n- [Peripheral Role: Advertising](#peripheral-role-advertising)\n- [Background BLE](#background-ble)\n- [State Restoration](#state-restoration)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n## Setup\n\n### Info.plist Keys\n\n| Key | Purpose |\n|---|---|\n| `NSBluetoothAlwaysUsageDescription` | Required. Explains why the app uses Bluetooth |\n| `UIBackgroundModes` with `bluetooth-central` | Background scanning and connecting |\n| `UIBackgroundModes` with `bluetooth-peripheral` | Background advertising |\n\n### Bluetooth Authorization\n\niOS prompts for Bluetooth permission automatically when you create a\n`CBCentralManager` or `CBPeripheralManager`. The usage description from\n`NSBluetoothAlwaysUsageDescription` is shown in the permission dialog.\n\n## Central Role: Scanning\n\n### Creating the Central Manager\n\nAlways wait for the `poweredOn` state before scanning.\n\n```swift\nimport CoreBluetooth\n\nfinal class BluetoothManager: NSObject, CBCentralManagerDelegate {\n    private var centralManager: CBCentralManager!\n    private var discoveredPeripheral: CBPeripheral?\n\n    override init() {\n        super.init()\n        centralManager = CBCentralManager(delegate: self, queue: nil)\n    }\n\n    func centralManagerDidUpdateState(_ central: CBCentralManager) {\n        switch central.state {\n        case .poweredOn:\n            startScanning()\n        case .poweredOff:\n            // Bluetooth is off -- prompt user to enable\n            break\n        case .unauthorized:\n            // App not authorized for Bluetooth\n            break\n        case .unsupported:\n            // Device does not support BLE\n            break\n        case .resetting, .unknown:\n            break\n        @unknown default:\n            break\n        }\n    }\n}\n```\n\n### Scanning for Peripherals\n\nScan for specific service UUIDs to save power. Pass `nil` to discover all\nperipherals (not recommended in production).\n\n```swift\nlet heartRateServiceUUID = CBUUID(string: \"180D\")\n\nfunc startScanning() {\n    centralManager.scanForPeripherals(\n        withServices: [heartRateServiceUUID],\n        options: [CBCentralManagerScanOptionAllowDuplicatesKey: false]\n    )\n}\n\nfunc centralManager(\n    _ central: CBCentralManager,\n    didDiscover peripheral: CBPeripheral,\n    advertisementData: [String: Any],\n    rssi RSSI: NSNumber\n) {\n    guard RSSI.intValue > -70 else { return } // Filter weak signals\n\n    // IMPORTANT: Retain the peripheral -- it will be deallocated otherwise\n    discoveredPeripheral = peripheral\n    centralManager.stopScan()\n    centralManager.connect(peripheral, options: nil)\n}\n```\n\n## Central Role: Connecting\n\n```swift\nfunc centralManager(\n    _ central: CBCentralManager,\n    didConnect peripheral: CBPeripheral\n) {\n    peripheral.delegate = self\n    peripheral.discoverServices([heartRateServiceUUID])\n}\n\nfunc centralManager(\n    _ central: CBCentralManager,\n    didFailToConnect peripheral: CBPeripheral,\n    error: Error?\n) {\n    // Handle connection failure -- retry or inform user\n    discoveredPeripheral = nil\n}\n\nfunc centralManager(\n    _ central: CBCentralManager,\n    didDisconnectPeripheral peripheral: CBPeripheral,\n    timestamp: CFAbsoluteTime,\n    isReconnecting: Bool,\n    error: Error?\n) {\n    if isReconnecting {\n        // System is automatically reconnecting\n        return\n    }\n    // Handle disconnection -- optionally reconnect\n    discoveredPeripheral = nil\n}\n```\n\n## Discovering Services and Characteristics\n\nImplement `CBPeripheralDelegate` to walk the service/characteristic tree.\n\n```swift\nextension BluetoothManager: CBPeripheralDelegate {\n    func peripheral(\n        _ peripheral: CBPeripheral,\n        didDiscoverServices error: Error?\n    ) {\n        guard let services = peripheral.services else { return }\n        for service in services {\n            peripheral.discoverCharacteristics(nil, for: service)\n        }\n    }\n\n    func peripheral(\n        _ peripheral: CBPeripheral,\n        didDiscoverCharacteristicsFor service: CBService,\n        error: Error?\n    ) {\n        guard let characteristics = service.characteristics else { return }\n        for characteristic in characteristics {\n            if characteristic.properties.contains(.notify) {\n                peripheral.setNotifyValue(true, for: characteristic)\n            }\n            if characteristic.properties.contains(.read) {\n                peripheral.readValue(for: characteristic)\n            }\n        }\n    }\n}\n```\n\n### Common Service and Characteristic UUIDs\n\n| Service | UUID | Characteristics |\n|---|---|---|\n| Heart Rate | `180D` | Heart Rate Measurement (`2A37`), Body Sensor Location (`2A38`) |\n| Battery | `180F` | Battery Level (`2A19`) |\n| Device Information | `180A` | Manufacturer Name (`2A29`), Model Number (`2A24`) |\n| Generic Access | `1800` | Device Name (`2A00`), Appearance (`2A01`) |\n\n```swift\nlet heartRateMeasurementUUID = CBUUID(string: \"2A37\")\nlet batteryLevelUUID = CBUUID(string: \"2A19\")\n```\n\n## Reading, Writing, and Notifications\n\n### Reading a Value\n\n```swift\nfunc peripheral(\n    _ peripheral: CBPeripheral,\n    didUpdateValueFor characteristic: CBCharacteristic,\n    error: Error?\n) {\n    guard let data = characteristic.value else { return }\n\n    switch characteristic.uuid {\n    case CBUUID(string: \"2A37\"):\n        let heartRate = parseHeartRate(data)\n        print(\"Heart rate: \\(heartRate) bpm\")\n    case CBUUID(string: \"2A19\"):\n        let batteryLevel = data.first.map { Int($0) } ?? 0\n        print(\"Battery: \\(batteryLevel)%\")\n    default:\n        break\n    }\n}\n\nprivate func parseHeartRate(_ data: Data) -> Int {\n    let flags = data[0]\n    let is16Bit = (flags & 0x01) != 0\n    if is16Bit {\n        return Int(data[1]) | (Int(data[2]) << 8)\n    } else {\n        return Int(data[1])\n    }\n}\n```\n\n### Writing a Value\n\n```swift\nfunc writeValue(_ data: Data, to characteristic: CBCharacteristic,\n                on peripheral: CBPeripheral) {\n    if characteristic.properties.contains(.writeWithoutResponse) {\n        peripheral.writeValue(data, for: characteristic, type: .withoutResponse)\n    } else if characteristic.properties.contains(.write) {\n        peripheral.writeValue(data, for: characteristic, type: .withResponse)\n    }\n}\n\n// Confirmation callback for .withResponse writes\nfunc peripheral(\n    _ peripheral: CBPeripheral,\n    didWriteValueFor characteristic: CBCharacteristic,\n    error: Error?\n) {\n    if let error {\n        print(\"Write failed: \\(error.localizedDescription)\")\n    }\n}\n```\n\n### Subscribing to Notifications\n\n```swift\n// Subscribe\nperipheral.setNotifyValue(true, for: characteristic)\n\n// Unsubscribe\nperipheral.setNotifyValue(false, for: characteristic)\n\n// Confirmation\nfunc peripheral(\n    _ peripheral: CBPeripheral,\n    didUpdateNotificationStateFor characteristic: CBCharacteristic,\n    error: Error?\n) {\n    if characteristic.isNotifying {\n        print(\"Now receiving notifications for \\(characteristic.uuid)\")\n    }\n}\n```\n\n## Peripheral Role: Advertising\n\nPublish services from the local device using `CBPeripheralManager`.\n\n```swift\nfinal class BLEPeripheralManager: NSObject, CBPeripheralManagerDelegate {\n    private var peripheralManager: CBPeripheralManager!\n    private let serviceUUID = CBUUID(string: \"12345678-1234-1234-1234-123456789ABC\")\n    private let charUUID = CBUUID(string: \"12345678-1234-1234-1234-123456789ABD\")\n\n    override init() {\n        super.init()\n        peripheralManager = CBPeripheralManager(delegate: self, queue: nil)\n    }\n\n    func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {\n        guard peripheral.state == .poweredOn else { return }\n        setupService()\n    }\n\n    private func setupService() {\n        let characteristic = CBMutableCharacteristic(\n            type: charUUID,\n            properties: [.read, .notify],\n            value: nil,\n            permissions: [.readable]\n        )\n\n        let service = CBMutableService(type: serviceUUID, primary: true)\n        service.characteristics = [characteristic]\n        peripheralManager.add(service)\n    }\n\n    func peripheralManager(\n        _ peripheral: CBPeripheralManager,\n        didAdd service: CBService,\n        error: Error?\n    ) {\n        guard error == nil else { return }\n        peripheralManager.startAdvertising([\n            CBAdvertisementDataServiceUUIDsKey: [serviceUUID],\n            CBAdvertisementDataLocalNameKey: \"MyDevice\"\n        ])\n    }\n}\n```\n\n## Background BLE\n\n### Background Central Mode\n\nAdd `bluetooth-central` to `UIBackgroundModes`. In the background:\n\n- Scanning continues but only for specific service UUIDs\n- `CBCentralManagerScanOptionAllowDuplicatesKey` is ignored (always `false`)\n- Discovery callbacks are coalesced and delivered in batches\n\n### Background Peripheral Mode\n\nAdd `bluetooth-peripheral` to `UIBackgroundModes`. In the background:\n\n- Advertising continues but data is reduced to service UUIDs only\n- The local name is not included in background advertisements\n\n## State Restoration\n\nState restoration allows the system to re-create your central or peripheral\nmanager after your app is terminated and relaunched for a BLE event.\n\n### Central Manager State Restoration\n\n```swift\n// 1. Create with a restoration identifier\ncentralManager = CBCentralManager(\n    delegate: self,\n    queue: nil,\n    options: [CBCentralManagerOptionRestoreIdentifierKey: \"myCentral\"]\n)\n\n// 2. Implement the restoration delegate method\nfunc centralManager(\n    _ central: CBCentralManager,\n    willRestoreState dict: [String: Any]\n) {\n    if let peripherals = dict[CBCentralManagerRestoredStatePeripheralsKey]\n        as? [CBPeripheral] {\n        for peripheral in peripherals {\n            // Re-assign delegate and retain\n            peripheral.delegate = self\n            discoveredPeripheral = peripheral\n        }\n    }\n}\n```\n\n### Peripheral Manager State Restoration\n\n```swift\nperipheralManager = CBPeripheralManager(\n    delegate: self,\n    queue: nil,\n    options: [CBPeripheralManagerOptionRestoreIdentifierKey: \"myPeripheral\"]\n)\n\nfunc peripheralManager(\n    _ peripheral: CBPeripheralManager,\n    willRestoreState dict: [String: Any]\n) {\n    // Restore published services, advertising state, etc.\n}\n```\n\n## Common Mistakes\n\n### DON'T: Scan or connect before poweredOn\n\n```swift\n// WRONG: Scanning immediately -- manager may not be ready\nlet manager = CBCentralManager(delegate: self, queue: nil)\nmanager.scanForPeripherals(withServices: nil) // May silently fail\n\n// CORRECT: Wait for poweredOn in the delegate\nfunc centralManagerDidUpdateState(_ central: CBCentralManager) {\n    if central.state == .poweredOn {\n        central.scanForPeripherals(withServices: [serviceUUID])\n    }\n}\n```\n\n### DON'T: Lose the peripheral reference\n\nCore Bluetooth does not retain discovered peripherals. If you don't hold a\nstrong reference, the peripheral is deallocated and the connection fails silently.\n\n```swift\n// WRONG: No strong reference kept\nfunc centralManager(_ central: CBCentralManager,\n                    didDiscover peripheral: CBPeripheral, ...) {\n    central.connect(peripheral) // peripheral may be deallocated\n}\n\n// CORRECT: Retain the peripheral\nfunc centralManager(_ central: CBCentralManager,\n                    didDiscover peripheral: CBPeripheral, ...) {\n    self.discoveredPeripheral = peripheral // Strong reference\n    central.connect(peripheral)\n}\n```\n\n### DON'T: Scan for nil services in production\n\n```swift\n// WRONG: Discovers every BLE device in range -- drains battery\ncentralManager.scanForPeripherals(withServices: nil)\n\n// CORRECT: Specify the service UUIDs you need\ncentralManager.scanForPeripherals(withServices: [targetServiceUUID])\n```\n\n### DON'T: Assume connection order or timing\n\n```swift\n// WRONG: Assuming immediate connection\ncentralManager.connect(peripheral)\ndiscoverServicesNow() // Peripheral not connected yet\n\n// CORRECT: Discover services in the didConnect callback\nfunc centralManager(_ central: CBCentralManager,\n                    didConnect peripheral: CBPeripheral) {\n    peripheral.delegate = self\n    peripheral.discoverServices([serviceUUID])\n}\n```\n\n### DON'T: Write to a characteristic without checking properties\n\n```swift\n// WRONG: Crashes or silently fails if write is unsupported\nperipheral.writeValue(data, for: characteristic, type: .withResponse)\n\n// CORRECT: Check properties first\nif characteristic.properties.contains(.write) {\n    peripheral.writeValue(data, for: characteristic, type: .withResponse)\n} else if characteristic.properties.contains(.writeWithoutResponse) {\n    peripheral.writeValue(data, for: characteristic, type: .withoutResponse)\n}\n```\n\n## Review Checklist\n\n- [ ] `NSBluetoothAlwaysUsageDescription` added to Info.plist\n- [ ] All BLE operations gated on `centralManagerDidUpdateState` returning `.poweredOn`\n- [ ] Discovered peripherals retained with a strong reference\n- [ ] Scanning uses specific service UUIDs (not `nil`) in production\n- [ ] `CBPeripheralDelegate` set before calling `discoverServices`\n- [ ] Characteristic properties checked before read/write/notify\n- [ ] Background mode (`bluetooth-central` or `bluetooth-peripheral`) added if needed\n- [ ] State restoration identifier set if app needs relaunch-on-BLE-event support\n- [ ] `willRestoreState` delegate method implemented when using state restoration\n- [ ] Scanning stopped after discovering the target peripheral\n- [ ] Disconnection handled with optional automatic reconnect logic\n- [ ] Write type matches characteristic properties (`.withResponse` vs `.withoutResponse`)\n\n## References\n\n- Extended patterns (reconnection strategies, data parsing, SwiftUI integration): [references/ble-patterns.md](references/ble-patterns.md)\n- [Core Bluetooth framework](https://sosumi.ai/documentation/corebluetooth)\n- [CBCentralManager](https://sosumi.ai/documentation/corebluetooth/cbcentralmanager)\n- [CBPeripheral](https://sosumi.ai/documentation/corebluetooth/cbperipheral)\n- [CBPeripheralManager](https://sosumi.ai/documentation/corebluetooth/cbperipheralmanager)\n- [CBService](https://sosumi.ai/documentation/corebluetooth/cbservice)\n- [CBCharacteristic](https://sosumi.ai/documentation/corebluetooth/cbcharacteristic)\n- [CBUUID](https://sosumi.ai/documentation/corebluetooth/cbuuid)\n- [CBCentralManagerDelegate](https://sosumi.ai/documentation/corebluetooth/cbcentralmanagerdelegate)\n- [CBPeripheralDelegate](https://sosumi.ai/documentation/corebluetooth/cbperipheraldelegate)","tags":["core","bluetooth","swift","ios","skills","dpearson2699"],"capabilities":["skill","source-dpearson2699","category-swift-ios-skills"],"categories":["swift-ios-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dpearson2699/swift-ios-skills/core-bluetooth","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under dpearson2699/swift-ios-skills","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T03:40:33.770Z","embedding":null,"createdAt":"2026-04-18T20:34:35.829Z","updatedAt":"2026-04-22T03:40:33.770Z","lastSeenAt":"2026-04-22T03:40:33.770Z","tsv":"'-1234':696,697,698,707,708,709 '-123456789':699,710 '-70':299 '/documentation/corebluetooth)':1293 '/documentation/corebluetooth/cbcentralmanager)':1297 '/documentation/corebluetooth/cbcentralmanagerdelegate)':1321 '/documentation/corebluetooth/cbcharacteristic)':1313 '/documentation/corebluetooth/cbperipheral)':1301 '/documentation/corebluetooth/cbperipheraldelegate)':1325 '/documentation/corebluetooth/cbperipheralmanager)':1305 '/documentation/corebluetooth/cbservice)':1309 '/documentation/corebluetooth/cbuuid)':1317 '0':546,547,562,567 '0x01':566 '1':573,582,874 '12345678':695,706 '1800':483 '180a':474 '180d':275,458 '180f':468 '2':576,889 '26':47 '2a00':486 '2a01':488 '2a19':471,499,541 '2a24':480 '2a29':477 '2a37':462,494,528 '2a38':466 '6.3':45 '8':577 'abc':700 'abd':711 'access':482 'ad':1185,1231 'add':781,814 'advertis':36,85,89,140,671,823,841,949 'advertisementdata':291 'allow':846 'alway':174,801 'app':122,228,860,1239 'appear':487 'assign':916 'assum':1099,1106 'author':142,230 'automat':148,371,1266 'background':38,90,93,130,139,776,778,789,811,822,840,1222 'background-bl':92 'batch':810 'batteri':467,469,549,1083 'batterylevel':543,550 'batteryleveluuid':496 'ble':22,91,94,240,777,867,1078,1189,1244 'bleperipheralmanag':683 'bluetooth':2,10,19,124,128,137,141,146,218,232,783,816,1007,1225,1229,1289 'bluetooth-centr':127,782,1224 'bluetooth-peripher':136,815,1228 'bluetoothmanag':187,393 'bodi':463 'bool':364 'bpm':537 'break':225,233,241,245,248,552 'call':1215 'callback':617,804,1122 'case':213,216,226,234,242,525,538 'category-swift-ios-skills' 'cbadvertisementdatalocalnamekey':774 'cbadvertisementdataserviceuuidskey':772 'cbcentralmanag':153,193,202,210,287,328,339,357,881,898,972,993,1039,1056,1126,1294 'cbcentralmanagerdeleg':189,1318 'cbcentralmanageroptionrestoreidentifierkey':887 'cbcentralmanagerrestoredstateperipheralskey':907 'cbcentralmanagerscanoptionallowduplicateskey':282,798 'cbcharacterist':514,593,627,658,1310 'cbmutablecharacterist':736 'cbmutableservic':748 'cbperipher':197,290,331,342,360,398,419,511,596,624,655,909,1042,1059,1129,1298 'cbperipheraldeleg':385,394,1212,1322 'cbperipheralmanag':155,679,689,716,724,760,930,941,1302 'cbperipheralmanagerdeleg':685 'cbperipheralmanageroptionrestoreidentifierkey':936 'cbservic':422,763,1306 'cbuuid':273,492,497,526,539,693,704,1314 'central':26,51,55,58,62,129,167,172,209,286,321,327,338,356,779,784,854,869,897,992,1038,1055,1125,1226 'central-role-connect':61 'central-role-scan':54 'central.connect':1043,1064 'central.scanforperipherals':997 'central.state':212,995 'centralmanag':192,201,285,326,337,355,880,896,1037,1054,1124 'centralmanager.connect':317,1109 'centralmanager.scanforperipherals':278,1084,1094 'centralmanager.stopscan':316 'centralmanagerdidupdatest':208,991,1193 'cfabsolutetim':362 'characterist':68,73,383,427,432,434,441,447,451,455,513,592,603,613,626,645,650,657,735,754,1139,1156,1169,1179,1217,1272 'characteristic.isnotifying':662 'characteristic.properties.contains':436,443,598,608,1164,1174 'characteristic.uuid':524,668 'characteristic.value':520 'charuuid':703,738 'check':1141,1160,1219 'checklist':106,109,1183 'class':186,682 'coalesc':806 'common':100,103,448,952 'common-mistak':102 'confirm':616,651 'connect':13,30,60,64,133,323,346,958,1027,1100,1108,1114 'content':48 'continu':791,824 'core':1,9,1006,1288 'corebluetooth':184 'correct':983,1049,1087,1116,1159 'cover':24 'crash':1145 'creat':151,170,852,875 'data':17,519,532,556,557,561,572,575,581,589,590,601,611,826,1154,1167,1177,1282 'data.first.map':544 'dealloc':312,1024,1048 'default':247,551 'deleg':203,717,882,893,917,931,973,989,1248 'deliv':808 'descript':158 'devic':23,236,472,484,677,1079 'dialog':166 'dict':900,906,943 'didadd':761 'didconnect':329,1121,1127 'diddisconnectperipher':358 'diddiscov':288,1040,1057 'diddiscovercharacteristicsfor':420 'diddiscoverservic':399 'didfailtoconnect':340 'didupdatenotificationstatefor':656 'didupdatevaluefor':512 'didwritevaluefor':625 'disconnect':375,1262 'discov':65,70,263,380,1011,1076,1117,1196,1258 'discoveredperipher':196,314,352,378,922 'discoveri':803 'discovering-services-and-characterist':69 'discoverservic':1216 'discoverservicesnow':1111 'dpearson2699':8 'drain':1082 'els':300,406,429,521,578,606,728,769,1172 'enabl':224 'energi':21 'error':343,344,365,366,400,401,423,424,515,516,628,629,632,659,660,764,765,767 'error.localizeddescription':636 'etc':951 'event':868,1245 'everi':1077 'exchang':16 'explain':119 'extend':1278 'extens':392 'fail':635,982,1028,1148 'failur':347 'fals':283,648,802 'filter':302 'final':185,681 'first':1162 'flag':560,565 'framework':1290 'func':207,276,284,325,336,354,395,416,508,554,587,621,652,721,732,757,895,938,990,1036,1053,1123 'gate':1191 'generic':481 'guard':297,402,425,517,725,766 'handl':345,374,1263 'heart':456,459,534 'heartrat':530,536 'heartratemeasurementuuid':491 'heartrateserviceuuid':272,280,335 'hold':1017 'identifi':879,1236 'ignor':800 'immedi':964,1107 'implement':384,890,1250 'import':183,305 'includ':838 'info.plist':113,1187 'inform':350,473 'init':199,713 'int':545,558,571,574,580 'integr':1285 'io':4,46,143 'is16bit':564,569 'isreconnect':363,368 'kept':1035 'key':114,115 'let':271,403,426,490,495,518,529,542,559,563,631,691,702,734,746,904,970 'level':470 'local':676,834 'locat':465 'logic':1268 'lose':1002 'low':20 'manag':173,857,870,925,965,971 'manager.scanforperipherals':977 'manufactur':475 'match':1271 'may':966,980,1046 'measur':461 'method':894,1249 'mistak':101,104,953 'mode':39,780,813,1223 'model':478 'mycentr':888 'mydevic':775 'myperipher':937 'name':476,485,835 'need':1093,1233,1240 'nil':206,261,320,353,379,413,720,743,768,885,934,976,979,1070,1086,1209 'notif':77,82,503,639,666 'notifi':437,741 'nsbluetoothalwaysusagedescript':117,160,1184 'nsnumber':296 'nsobject':188,684 'number':479 'oper':1190 'option':281,319,376,886,935,1265 'order':1101 'otherwis':313 'overrid':198,712 'pars':1283 'parseheartr':531,555 'pass':260 'pattern':1279 'peripher':32,34,83,87,138,251,265,289,308,315,318,330,341,359,396,397,417,418,509,510,595,622,623,653,654,669,723,759,812,817,856,905,911,913,923,924,940,1004,1012,1022,1041,1044,1045,1052,1058,1061,1065,1110,1112,1128,1197,1230,1261 'peripheral-role-advertis':86 'peripheral.delegate':332,920,1130 'peripheral.discovercharacteristics':412 'peripheral.discoverservices':334,1132 'peripheral.readvalue':445 'peripheral.services':405 'peripheral.setnotifyvalue':438,642,647 'peripheral.state':726 'peripheral.writevalue':600,610,1153,1166,1176 'peripheralmanag':688,715,758,929,939 'peripheralmanager.add':755 'peripheralmanager.startadvertising':771 'peripheralmanagerdidupdatest':722 'permiss':147,165,744 'power':259 'poweredoff':217 'poweredon':178,214,727,960,986,996,1195 'primari':751 'print':533,548,633,663 'privat':190,194,553,686,690,701,731 'product':269,1073,1211 'prompt':144,221 'properti':739,1142,1161,1218,1273 'publish':672,947 'purpos':116 'queue':205,719,884,933,975 'rang':1081 'rate':457,460,535 're':851,915 're-assign':914 're-creat':850 'read':74,79,444,500,504,740 'read/write/notify':1221 'readabl':745 'readi':969 'reading-writing-and-notif':78 'receiv':665 'recommend':267 'reconnect':372,377,1267,1280 'reduc':828 'refer':110,111,1005,1020,1034,1063,1202,1277 'references/ble-patterns.md':1286,1287 'relaunch':864,1242 'relaunch-on-ble-ev':1241 'requir':118 'reset':243 'restor':42,96,99,843,845,872,878,892,927,946,1235,1254 'retain':306,919,1010,1050,1198 'retri':348 'return':301,373,407,430,522,570,579,729,770,1194 'review':105,108,1182 'review-checklist':107 'role':27,35,52,56,59,63,84,88,168,322,670 'rssi':294,295 'rssi.intvalue':298 'save':258 'scan':11,28,53,57,131,169,181,249,252,790,956,963,1068,1203,1255 'self':204,333,718,883,921,932,974,1131 'self.discoveredperipheral':1060 'sensor':464 'servic':37,66,71,255,381,404,409,411,415,421,449,453,673,747,756,762,796,830,948,1071,1090,1118,1206 'service.characteristics':428,753 'service/characteristic':389 'serviceuuid':692,750,773,999,1133 'set':1213,1237 'setup':49,50,112 'setupservic':730,733 'shown':162 'signal':304 'silent':981,1029,1147 'skill':5,6 'sosumi.ai':1292,1296,1300,1304,1308,1312,1316,1320,1324 'sosumi.ai/documentation/corebluetooth)':1291 'sosumi.ai/documentation/corebluetooth/cbcentralmanager)':1295 'sosumi.ai/documentation/corebluetooth/cbcentralmanagerdelegate)':1319 'sosumi.ai/documentation/corebluetooth/cbcharacteristic)':1311 'sosumi.ai/documentation/corebluetooth/cbperipheral)':1299 'sosumi.ai/documentation/corebluetooth/cbperipheraldelegate)':1323 'sosumi.ai/documentation/corebluetooth/cbperipheralmanager)':1303 'sosumi.ai/documentation/corebluetooth/cbservice)':1307 'sosumi.ai/documentation/corebluetooth/cbuuid)':1315 'source-dpearson2699' 'specif':254,795,1205 'specifi':1088 'startscan':215,277 'state':41,95,98,179,842,844,871,926,950,1234,1253 'state-restor':97 'stop':1256 'strategi':1281 'string':274,292,493,498,527,540,694,705,901,944 'strong':1019,1033,1062,1201 'subscrib':637,641 'super.init':200,714 'support':239,1246 'swift':3,44,182,270,324,391,489,507,586,640,680,873,928,961,1030,1074,1104,1143 'swiftui':1284 'switch':211,523 'system':369,848 'target':43,1260 'targetserviceuuid':1096 'termin':862 'time':1103 'timestamp':361 'tree':390 'true':439,643,752 'type':604,614,737,749,1157,1170,1180,1270 'uibackgroundmod':125,134,786,819 'unauthor':227 'unknown':244,246 'unsubscrib':646 'unsupport':235,1152 'usag':157 'use':123,678,1204,1252 'user':222,351 'uuid':256,452,454,797,831,1091,1207 'valu':506,585,742 'var':191,195,687 'vs':1275 'wait':175,984 'walk':387 'weak':303 'willrestorest':899,942,1247 'without':1140 'withoutrespons':605,1181,1276 'withrespons':615,619,1158,1171,1274 'withservic':279,978,998,1085,1095 'write':75,80,501,583,609,620,634,1136,1150,1165,1269 'writevalu':588 'writewithoutrespons':599,1175 'wrong':962,1031,1075,1105,1144 'yet':1115","prices":[{"id":"c75b39d5-f015-4742-a387-cc8f1fe030a1","listingId":"f89b9d46-471e-498d-a67a-ab94ba4e881b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dpearson2699","category":"swift-ios-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:34:35.829Z"}],"sources":[{"listingId":"f89b9d46-471e-498d-a67a-ab94ba4e881b","source":"github","sourceId":"dpearson2699/swift-ios-skills/core-bluetooth","sourceUrl":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/core-bluetooth","isPrimary":false,"firstSeenAt":"2026-04-18T22:00:51.642Z","lastSeenAt":"2026-04-22T00:53:42.201Z"},{"listingId":"f89b9d46-471e-498d-a67a-ab94ba4e881b","source":"skills_sh","sourceId":"dpearson2699/swift-ios-skills/core-bluetooth","sourceUrl":"https://skills.sh/dpearson2699/swift-ios-skills/core-bluetooth","isPrimary":true,"firstSeenAt":"2026-04-18T20:34:35.829Z","lastSeenAt":"2026-04-22T03:40:33.770Z"}],"details":{"listingId":"f89b9d46-471e-498d-a67a-ab94ba4e881b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dpearson2699","slug":"core-bluetooth","source":"skills_sh","category":"swift-ios-skills","skills_sh_url":"https://skills.sh/dpearson2699/swift-ios-skills/core-bluetooth"},"updatedAt":"2026-04-22T03:40:33.770Z"}}