Created
July 27, 2018 08:31
-
-
Save SunXiaoShan/6f83175fc511721cc7d7ea67e22a9194 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)centralManagerDidUpdateState:(CBCentralManager *)central { | |
| if (central.state != CBCentralManagerStatePoweredOn) { | |
| return; | |
| } | |
| [self scan:central]; | |
| } | |
| - (void)scan:(CBCentralManager *)central { | |
| CBUUID *uuid = [CBUUID UUIDWithString:kServiceUUID]; | |
| [central scanForPeripheralsWithServices:@[uuid] | |
| options:@{CBCentralManagerScanOptionAllowDuplicatesKey:@YES}]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment