How to populate OTP from user's message box to application directly in iPhone?

Yasha picture Yasha · Jan 3, 2014 · Viewed 14.4k times · Source

I am working on an internet trading application with its mobile and iPhone applications available. With the recent market trend, we are working on including two-factor authentication. For that, we will be sending a one-time password as a sms on user's registered mobile number.

Is there a way,that the OTP can get automatically populated into application from user's message box in iPhone? What algorithm should I use to make my app read user's message box?

Thanks in advance:)

Answer

Janak Nirmal picture Janak Nirmal · Jan 3, 2014

Straight Forward answer NO

It is not possible to read SMS programmatically as of now as applications in iOS are sandboxed, which means you can not read anything from user's phone outside of your application.