Question: how to retrieve accidentally deleted text messages on iphone?
Answer: Go to Settings > Name> iCloud > iCloud Backup. Make sure iCloud Backup is enabled. Erase your iPhone by going into Settings > General > Reset. Choose Erase All Content and Settings. You'll be asked if you want to restore your iPhone from an iCloud Backup.