rajt
rajt

Reputation: 300

iPhone application – reading SMS

I need to develop an iPhone application which needs to read the incoming SMS received by the user, manipulate the text, and then display it in the application.

Could someone clarify whether it is possible to read the SMS received within our application development?

Thanks!

Upvotes: 15

Views: 12072

Answers (3)

Ramkrishna Sharma
Ramkrishna Sharma

Reputation: 7019

UPDATE

From iOS 12 Apple will allow the support to read One Time Code(OTP - One Time Password) which you will get in the iPhone device.

iOS 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/UITextView in storyboard/XIB click 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.

WWDC 2018 iPhoneX Device

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.

Upvotes: 6

Sébastien Stormacq
Sébastien Stormacq

Reputation: 14905

It is only possible when the phone is Jailbreaked. There are many tools to jailbreak your phone.

Once Jailbreaked, an application cal open the SQLite database at

/var/mobile/Library/SMS/sms.db

and read the message table.

It contains, the date/time at which the message was received, the sender/recipient phone number and even the clear text of the message.

Upvotes: 14

Mads Mobæk
Mads Mobæk

Reputation: 35940

Intercepting/reading incoming SMS is not possible on iOS (for privacy reasons).

Upvotes: 20

Related Questions