如何在 iOS 中实现 AutoFill OTP 验证和 Auto Proceed

How to implement AutoFill OTP verification and Auto Proceed in iOS

我正在尝试使用自动填充 OTP,但它不起作用。谁帮帮我。

if #available(iOS 12.0, *) {
     otpField.textContentType = .oneTimeCode
}

如果您必须在 iOS 中实施 AutoFill-OTP,则需要 iOS 12 岁及以上

您必须将 TextField ContentType 设置为 OneTimeCode 如下图

  • 图片

Note:- It only works when OTP message is included Code or PassCode keyword.