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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…