Core Bluetooth snippets with Swift

1 · Shuichi Tsutsumi · Feb. 24, 2016, 1:40 a.m.
This article shows simple examples (code snippets) of Core Bluetooth with Swift & Objective-C.importobjc@import CoreBluetooth;swiftimport CoreBluetoothCentral ManagerInitializeAdopt protocol and define properties.objc@interface SomeClass () <CBCentralManagerDelegate>@property (nonatomic, strong) CBCentralManager *centralManager;@property (nonatomic, strong) CBPeripheral *peripheral;@endswiftclass ComeClass: SomeSuperclass, CBCentralManagerDelegate { var centralManager: CBCentralManager! va...