Skip to content

Instantly share code, notes, and snippets.

@earltedly
Last active August 29, 2015 14:18
Show Gist options
  • Save earltedly/2f3247d73a2ef8b0ebbb to your computer and use it in GitHub Desktop.
Save earltedly/2f3247d73a2ef8b0ebbb to your computer and use it in GitHub Desktop.
Pebble UUID in Swift
let pebble = PBPebbleCentral.defaultCentral()
pebble.delegate = self
var uuidBytes = Array<UInt8>(count:16, repeatedValue:0)
let uuid = NSUUID(UUIDString: "acde6706-633f-404d-b99a-1fc57842593a")
uuid?.getUUIDBytes(&uuidBytes)
pebble.appUUID = NSData(bytes: &uuidBytes, length: uuidBytes.count)
watch = pebble.lastConnectedWatch()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment