Once spyware has infected a phone, it can be used to access all device features — including the camera. To prevent hackers spying on you, protect your iPhone with free iOS security, and set up a VPN to encrypt your internet connection. Using a VPN on your PC or any other devices linked to your phone, as well as taking extra precautions on public Wi-Fi will also help to keep you safe.