Given the iPhone’s immense popularity, a potential security threat was inevitable.