Example of using TOTP with iCloud Keychain in iOS 15

Installation

This example needs Ngrok and Ruby 3.0.3+.

  1. Setup project with Makefile.
make
  1. Input your Apple Developer Team ID for Apple App Site Association. (You can find it from https://developer.apple.com/account/)

  2. Run Ngrok. It bridges between your localhost and the Apple server.

ngrok http 4567
  1. Run Sinatra. (Local API Server)
ruby api.rb
  1. Open the .xcworkspace file and build project. It automatically matches the host name to the running ngrok’s forwarding host.

  2. Close and reopen the project. (Due to Info.plist bug in Xcode 13.2.1 ?. See Xcode 13 Missing Info.plist article at useyourloaf.com)

The GitHub Link:

https://github.com/Makeeyaf/keychain-verification-code-example