Apple is urging users to update their iPhones after the discovery of new spyware that can take over phones running older versions of the iOS operating system.