12

In my application I am able to send an SMS programatically to a particular mobile number when the user clicks submit button. Then there is a response message from that mobile number now I want to read that message and populate that SMS text in to my application.

I searched for this and found that this is not possible in iOS. My question is there any possibility accessing inbox SMS with user permissions?

Alex Zavatone
  • 4,106
  • 36
  • 54
Suresh Peddisetti
  • 3,782
  • 3
  • 23
  • 26

3 Answers3

23

Simply two words from Apple:

Not Possible

Detailed:

An iOS app can only access the data for which Apple supplies a documented public API. iOS can not access outside of the sandbox until Apple provides a public API for it. So intercepting/reading an incoming SMS not possible. And no idea when the iOS device is jailbroken.

JJJ
  • 32,902
  • 20
  • 89
  • 102
Buntylm
  • 7,345
  • 1
  • 31
  • 51
5

No it's not possible in iOS, it's possible on jailbroken devices but you can not place your application in the App Store.

Alex Zavatone
  • 4,106
  • 36
  • 54
Retro
  • 3,985
  • 2
  • 17
  • 41
0

You can't read SMS, but you can auto fill a text field from SMS.

From Apple Documentation :

To ensure your text input view displays the right AutoFill suggestions, set the textContentType property on any relevant input views.

so you can do the following :

textField.textContentType = .oneTimeCode

More info : check the link here

iosMentalist
  • 3,066
  • 1
  • 30
  • 40