Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read verification code automatically and access for Login in App in iOS

Tags:

ios

iphone

sms

I am creating one App and it has verification phone number required functionality which allow user to enter into App. We send sms to the Users through the gateway and we need to read verification code directly from the SMS without typing code into App. But don't know how to read verification code automatic from the SMS and access in my App.I have gone thorugh the searches for this but could not find any path to move ahead. Is it allow in iOS and if Yes, can anyone tell me what to do to achieve it. Thanks.

like image 434
Utpal Pungyera Avatar asked Apr 27 '15 06:04

Utpal Pungyera


1 Answers

From iOS 12 it is possible to improve the user experience for native textField (actually anything that implements UITextInputTraits to be precise) by:

myOTPTextField.textContentType = .oneTimeCode

More information can be found in docs

For the HTML you can achieve it by:

<input id="my-one-time-password-textfield" autocomplete="one-time-code"/>

More information can be found in docs

like image 101
Julian Avatar answered Sep 27 '22 20:09

Julian