Skip to content

Instantly share code, notes, and snippets.

@ryanjjones10
Created June 29, 2016 22:45
Show Gist options
  • Save ryanjjones10/298dffd6cb6cb2bb8c36490d3d817987 to your computer and use it in GitHub Desktop.
Save ryanjjones10/298dffd6cb6cb2bb8c36490d3d817987 to your computer and use it in GitHub Desktop.
func centralManagerDidUpdateState(central: CBCentralManager) {
if (central.state == CBCentralManagerState.PoweredOn) {
self.centralManager?.scanForPeripheralsWithServices(nil, options: nil)
self.currentState.text = "Scanning"
} else {
print("BLE not on")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment