I\'m an iOS developer and i have tried to build a mobile application with automatic activation functionality, i found more than way to read SMS message but only using privat
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
Select
UITextField/UITextViewinstoryboard/XIBclick Click on Attribute inspector. Go to text input trait, click to Content type and select one time code and done.
It only works with System keyboard. So avoid using the custom keyboard.
And for more information, you will also review WWDC 2018 Session 204 - Automatic Strong Passwords and Security Code AutoFill and jump to 24:28 for automatic pre-fill the OTP.