If someone installs spyware onto your device, then they can remotely access any of the data on your iPhone – including all of your text messages.