Apple Inc is reportedly making its latest operating system, iOS 7, immune to hackers who indulge in spying when an iPhone or iPad user plugs the device into a fake charger.

This software update for the latest beta version of iOS 7 will fix the security flaw, the company told Reuters on Wednesday. But the software update is available for users with Apple developer accounts, and the rest shall wait till iOS 7 is officially unveiled, probably in September.

The custom-built fake charger is capable to infect the smartphone with viruses. These chargers are equipped with a Linux computer and let hackers use the iPhone as a remote control, or steal sensitive information like credit card numbers or bank account passwords.

Interestingly, none of Android-powered smartphones experience such problems. Devices running on Android operating system display a warning on the screen when the smartphone is plugged into any charging station, be it a desktop or laptop.

Apple was alerted about the bug by three computer scientists earlier this year. "We would like to thank the researchers for their valuable input," Apple spokesman Tom Neumayr told Reuters.

Billy Lau, from Georgia Institute of Technology, and two others demonstrated the security flaw at an annual hacking convention in Las Vegas on Wednesday to 7,000 security professionals.

The trio demonstrated by plugging an iPhone into a fake charger with a tiny Linux computer. The device that was immediately affected with a virus started working as a remote control and dialled a number to one of the researchers.

They said such viruses could take screenshots or access emails, text messages or even track the location of an iPhone user.