Created
June 30, 2016 00:54
-
-
Save ryanjjones10/4be21b76b70cbb68d9539c810e49333a 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
func centralManager(central: CBCentralManager, didConnectPeripheral peripheral: CBPeripheral) { | |
peripheral.delegate = self | |
peripheral.discoverServices(nil) | |
print("connected to \(peripheral)") | |
self.stopScan() | |
} | |
func centralManager(central: CBCentralManager, didFailToConnectPeripheral peripheral: CBPeripheral, error: NSError?){ | |
print("connection failed", error) | |
} | |
func stopScan(){ | |
self.centralManager.stopScan() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment