An iPhone, like any smartphone, is vulnerable to viruses and malware that take your data without your knowledge. When your iPhone is restored, it should be returned to factory defaults and as clean as the day you bought it. If you suspect someone has hacked your iPhone after restoring it, examine the device, fix the problem and prevent future malware from being installed.
Restoring the iPhone means returning it to its out-of-box state -- all your data, personal settings and media are removed. Any software problems will be wiped clean and you have to go through the steps to set up the iPhone again. If a person restores your phone and completes the setup process for you, he can install apps and affect other settings. Since iOS only allows apps to be downloaded from the App Store -- and apps on the App Store aren't designed to hack your phone -- your apps aren't suspect. However, any software can be hacked and any person with enough skill can hack into your device.
A restored and jailbroken iPhone offers an additional host of security issues. It's designed to bypass Apple's built-in security and allow you to install apps from third-party app stores. Examine the apps on your restored iPhone and make sure that none were installed after the device was restored. The only apps on the iPhone should be the ones that come with the phone and software.
Anyone who uses your iPhone -- including a person who resets it -- can install any iPhone-compatible app or malware. Only allow trusted individuals to use your phone. If you suspect the same person who restored your iPhone has hacked into it, check for apps or files on the device that aren't supposed to be installed with iOS. If you find a suspicious app, reset your iPhone again. Your phone may have been jailbroken without your permission.
There are several things to look out for if you're concerned that your iPhone has been hacked. If your email account starts sending out strange messages from your iPhone, you may have been hacked. Receiving spam text messages or sending text messages without your input may also signal that malware is on your iPhone. Watch for apps that open or close without you touching the phone. Check your browser history to see whether the Internet has been accessed when you weren't using the phone.
To keep your iPhone secure, install antivirus software -- there's no reason to protect your iPhone less than you protect other electronic devices. Run scans to check for viruses regularly and follow the instructions on your antivirus program to remove any threats. Ensure your iPhone has the latest version of iOS at all times as well; Apple frequently rolls out important security fixes in software updates. Finally, be vigilant about what apps and files you download to the iPhone. If you don't trust the source, don't download it.