Skip to content

Instantly share code, notes, and snippets.

@denkeni
Last active August 29, 2015 14:24
Show Gist options
  • Save denkeni/355580ffc0644010683c to your computer and use it in GitHub Desktop.
Save denkeni/355580ffc0644010683c to your computer and use it in GitHub Desktop.
How Apple Watch Password Lock Works
addObserver(IPHONE_DID_UNLOCKED) {
  if isOnSkin {
    locked = false
  }
}

addObserver(WATCH_OFF_SKIN) {
  locked = true
}

func watchOn() {
  if isLocked {
    requirePasswdToUnlock()
  }
  ...
}

func watchOff() {
  if isOffSkin {
    locked = true
  }
  ...
}

Whenever you take off Apple Watch, it gets locked.

Apple Watch stays unlocked only after you put on it, and unlock it or unlock paired iPhone once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment