Can an ios application access sms messages? I've read some articles that tend to say that app store downloaded apps on a non jailbroken iphone can't read sms messages, which seems to be confirmed by the fact there's no "messages access" category under settings>privacy.

However, I remember that some apps sending OTP through sms can automatically detect reception of the SMS and pull the OTP without intervention. There are also some apps that claim they can spy on a phone text messages.

So I have a doubt, and I would appreciate your input on this.
It is nearly impossible for this to occur because Apple has next level security, as well as they scan apps before they are placed on the AppStore! They specifically scan for malware and security breaches, like this one!! All iPhones are extremely secure and if an app can access your messages (which I don’t think it can) they would be breaching the Apple Privacy Policy along with some other Terms and Conditions! Highly unlikely, but good question.