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.
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
Select
UITextField/UITextViewinstoryboard/XIBclick Click on Attribute inspector. Go to text input trait, click to Content type and select one time code and done.
The operating system will detect verification codes from Messages automatically with this UITextContentType set.
Warning
If you use a custom input view for a security code input text field, iOS cannot display the necessary AutoFill UI.
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.