can my app knows that I received a sms on my iphon

2019-01-20 18:44发布

问题:

I am, creating a app in which i need to show message to user that you received sms , is it possible using NSNotificationCenter. Please help?

回答1:

It's not possible, as far as I know. iOS treats a new SMS very similarly to a push notification sent to the system, and your code doesn't get notified of push notifications that are not sent to your app.

To reiterate, iOS does not notify your app when an SMS (text message) has been received by your phone.