If you want to be sure nobody is spying on you through your laptop's webcam, the best thing you can do is cover the lens—but the same might actually be true for the camera on your Apple smartphone.

Felix Krause, a developer at Google, has found that any iOS app could secretly use the iPhone's camera to record images and video of the user, once given permission to access the camera at all. Krause developed an app for demonstration purposes that shows how an app could use either front or rear cameras to capture images and video in the background. The resulting footage or images could be directly transferred to cloud servers without the user being aware or receiving any notifications.

The camera could also be used to run real-time face recognition, possibly even identifying the user.

The good news is that Krause's app is not approved for distribution through the iTunes App Store; hopefully such malicious behavior would be picked up during Apple's pretty strict review process. However, if you want to be entirely certain you're not being spied on, the best options seem to be covering the lens or not granting camera access to any app you don't 100 percent trust.

For a better idea of the issue, watch the video below that shows Krause's proof-of-concept app in action, or read the full report on his website.