KWVerificationCodeView icon indicating copy to clipboard operation
KWVerificationCodeView copied to clipboard

AutoFill on a UITextField is not working

Open thanushkaPraveen opened this issue 4 years ago • 4 comments

Security Code Autofill in not working. Automatic OTP verification in iOS - https://developer.apple.com/videos/play/wwdc2018/204/

this library auto fill is not working because of text field are not empty. first field has " " space. so pin number from sms is not showing on the keyboard.

thanushkaPraveen avatar Jun 20 '20 08:06 thanushkaPraveen

Is anyone working on this issue?

akshitverma avatar Jul 10 '20 08:07 akshitverma

inside this library KWVerificationCodeView there is a class KWVerificationCodeView under extensions go to that class (KWVerificationCodeView) and change this line textFieldViews[0].numberTextField.text = " " to as this textFieldViews[0].numberTextField.text = "" (remove the space inside the quotation marks)

and then, go to KWTextFieldView class under classes folder and change this statement static let maxCharactersLength = 1 to as this static let maxCharactersLength = 0

Security Code Autofill works with these changes pin number will show on the keyboard.

sometime -> you may have to change numberTextField content type as One time code in the KWTextFieldView.xib go to -> KWTextFieldView.xib click on numberTextField change content type as One time code under input traits

thanushkaPraveen avatar Jul 16 '20 11:07 thanushkaPraveen

inside this library KWVerificationCodeView there is a class KWVerificationCodeView under extensions go to that class (KWVerificationCodeView) and change this line textFieldViews[0].numberTextField.text = " " to as this textFieldViews[0].numberTextField.text = "" (remove the space inside the quotation marks)

and then, go to KWTextFieldView class under classes folder and change this statement static let maxCharactersLength = 1 to as this static let maxCharactersLength = 0

Security Code Autofill works with these changes pin number will show on the keyboard.

sometime -> you may have to change numberTextField content type as One time code in the KWTextFieldView.xib go to -> KWTextFieldView.xib click on numberTextField change content type as One time code under input traits

This doesn't seem to work. Tested device - iOS 13.5.1 on iPhone 7

MewanSnappymob avatar Jul 17 '20 03:07 MewanSnappymob

inside this library KWVerificationCodeView there is a class KWVerificationCodeView under extensions go to that class (KWVerificationCodeView) and change this line textFieldViews[0].numberTextField.text = " " to as this textFieldViews[0].numberTextField.text = "" (remove the space inside the quotation marks)

and then, go to KWTextFieldView class under classes folder and change this statement static let maxCharactersLength = 1 to as this static let maxCharactersLength = 0

Security Code Autofill works with these changes pin number will show on the keyboard.

sometime -> you may have to change numberTextField content type as One time code in the KWTextFieldView.xib go to -> KWTextFieldView.xib click on numberTextField change content type as One time code under input traits

@thanushkaPraveen Feel free to open a PR with these changes. We will test and if works, we will merge. Thanks.

kpavankotesh avatar Jul 17 '20 04:07 kpavankotesh