Is there any way to access data from iPhone inbox(SMS) to ios application to do automatic OTP verification like the one in Android? I shall be grateful for your help.
相关问题
- CALayer - backgroundColor flipped?
- Listening to outgoing sms not working android
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
you can easily set this in Storyboard
UPDATE
From iOS 12 Apple will supports Password AutoFill on UITextField, UITextView, and any custom view that adopts the UITextInput protocol. System keyboard set the textContentType on it to .oneTimeCode
1) Using Code
singleFactorCodeTextField.textContentType = .oneTimeCode
2) Using Storyboard/XIB
The operating system will detect verification codes from Messages automatically with this
UITextContentType
set.For more information, you can check it on the Apple developer oneTimeCode
And also review WWDC 2018 Session 204 - Automatic Strong Passwords and Security Code AutoFill and jump to 24:28 for automatic pre-fill the OTP.
UPDATE
This is now possible in iOS 12 with Security Code Autofill
Apple is using it in apple pay card verification since iOS 11
No.
Because this would be considered a privacy issue, you cannot access the users SMS inbox.
You can get OTP from your message.
Can please get the project from his link.
https://github.com/karthickkck315/Automatic-OTP
In iOS 12 Apple has introduced feature called
Security Code AutoFill
.To use this in your app all you need to do is set
UITextField
's input view’stextContentType
propertyoneTimeCode
.NOTE: Security Code AutoFill will only works with System Keyboard it will not work with custom keyboard.
WWDC video
When you get OTP it will look something like this: