-1

In SwiftUI with iOS I know you can do the following to have the keyboard auto suggest an OTP that arrives by SMS:

TextField("OTP", text: $otp)
    .keyboardType(.numberPad)
    .textContentType(.oneTimeCode)

In my app I'm using a custom number pad. Is it possible instead to fetch the OTP without using the keyboard so I can auto populate the custom fields myself automatically?

Joseph
  • 691
  • 4
  • 18

1 Answers1

-1

Starting with iOS 12, the operating system automatically offers to substitute the incoming OTP code in the text field.

Automatic OTP verification in iOS?

AlexM
  • 317
  • 2
  • 5