Tapping oneTimeCode AutoFill suggestion fails to populate UITextField

Hi all,


I'm having a bit of difficulty with the "one time code" AutoFill functionality on the final versions of iOS 12 and Xcode 10.

I've got a very basic UITextField and have set "content type" as "one time code" - all other settings have been left at their defaults.


When my SMS arrives and the text field is first responder I see the code appear in the QuickType bar, but tapping on it doesn't do anything. The button highlights as expected but the text field's content isn't updated.


The textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) delegate is called when tapping the QuickType option, but the replacement text is just an empty string.


Any ideas why this may be happening? Oddly, this feature worked totally fine when I first tried it out with a beta version of Xcode and iOS 12.


Thanks!

The same issue iOS 13 Xcode 12.4, it used to work fine on my phone but suddenly stopped to work, something is wrong, probably after updating Xcode or iOS version on my phone

I too face exactly same issue. This use to work before iOS 15 versions.

Tapping oneTimeCode AutoFill suggestion fails to populate UITextField
 
 
Q