Last active
July 27, 2018 08:07
-
-
Save SunXiaoShan/43d54908fd69ac02575be54e7fe1e54a 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)peripheralManager:(CBPeripheralManager *)peripheral | |
| central:(CBCentral *)central | |
| didSubscribeToCharacteristic:(CBCharacteristic *)characteristic { | |
| if (![self.centralM containsObject:central]) { | |
| [self.centralM addObject:central]; | |
| } | |
| [self updateCharacteristicValue]; | |
| [self stopAdvertising]; | |
| } | |
| - (void)peripheralManager:(CBPeripheralManager *)peripheral | |
| central:(CBCentral *)central | |
| didUnsubscribeFromCharacteristic:(CBCharacteristic *)characteristic { | |
| [self startAdvertising]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment