Demo
https://github.com/iKangtai/BLE_SDK_Demo_iOS
Bluetooth Low Energy SDK
Define
1 | /// YCBLEState |
YCPeripheralDelegate
1 | @protocol YCPeripheralManagerDelegate <NSObject> |
Class
YCPeripheral
1 |
|
YCTemperature
1 |
|
YCPeripheralManager
1 | /// Delegate |
1 | /** |
Access Guide
Add SDK reference
Add YCPeripheral.framework to your project.
Init before using SDK
Set [YCPeripheralManager shared]’s delegate and implementation YCPeripheralManagerDelegate protocol.
Scan nearby Bluetooth devices
[[YCPeripheralManager shared] startScan];
Connect the Bluetooth device
[[YCPeripheralManager shared] connectPeripheral:peripheral];
Manually release resources when the call is completed
[[YCPeripheralManager shared] stopScan];
[[YCPeripheralManager shared] disconnectPeripheral:peripheral];