Created
July 9, 2020 02:24
-
-
Save AminPlusPlus/ae86d63279afe211739a7cc1ad69e32b to your computer and use it in GitHub Desktop.
PeripheralDiscoverCharac
This file contains 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
//MARK:- CBPeripheralDelegate | |
extension ViewController : CBPeripheralDelegate { | |
func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) { | |
if let services = peripheral.services { | |
//discover characteristics of services | |
for service in services { | |
peripheral.discoverCharacteristics(nil, for: service) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment