How to listen for sms reception in ios 8 ?

I want my application to be notified when a sms received so that I can fill a field in my application with a verification code received by sms to verify the user mobile number , is that possible ?

Replies

I want my application to be notified when a sms received so that I can fill a field in my application with a verification code received by sms to verify the user mobile number , is that possible ?

No. iOS apps have no access to incoming SMS messages.

At this point I usually suggest that folks file an enhancement request for an API to meet their needs. However, in this case there’s very little point: it’s hard to imagine how we could reconcile access to the SMS database with our privacy goals.

Do you control the format of the SMS message? If so, it’s possible you could put stuff in the message to make the process smoother. An obvious example would be a URL that the user could tap.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi,

How whatsapp is doing it during registeration ?



Thank you.

How whatsapp is doing it during registeration ?

Sorry, I’m not in a position to reverse engineer other developer’s apps on your behalf. However, in general terms, my experience is that apps that are doing seemingly-impossible things fall into one of four categories:

  • they're breaking the rules and App Review hasn't caught them yet (A)

  • their app doesn’t actually work the way that you think it does (B)

  • their marketing material is being economical with the truth (C)

  • they are grandfathered in from a previous world (D)

[Point D is very common on the Mac App Store but less common on iOS.]

I can, however, state with absolute confidence that there is no supported way for third-party developers to access incoming SMS messages on the device itself.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

It seems the Pebble SmartWatch is able to do something like this. Their app somehow listens for incoming SMS, calls, emails and calendar notifications, then they send it to the watch. How is this done?

Accessories can do this in a variety of ways. I’m not sure exactly which one that device is using, but if you put me up against a wall and made me take a guess I’d say it’s probably ANCS.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"