If you do suspect your iPad or iPhone may be infected with malware, don't panic! However, you should take no chances. Instead, just follow these instructions to wipe your gadget clean and start over with factory settings.
- Use iCloud to back up your device and all personal data on it
- Go to Settings > General > Reset
- Tap “Erase All Content and Settings” to clear all apps and data from the device
- Restart your iOS device and set it up again
- Sign into iCloud when you set up your iOS device and restore your backed up data
- If needed, download your apps again from the App Store
You can also attach your iPhone or iPad to your Mac and use the “Restore iPhone/iPad” button in iTunes to factory-reset the device. The key to these steps is they clear out all programs on your iOS device which may have been compromised, and replace them with fresh copies. Your data and files should all be preserved, though you might lose some application settings.
If you suspect that restoring your phone to factory settings didn't do the trick, then feel free to take the phone to Apple's Genius Bar. They have system-scanning software that detects and removes any hidden files.