‘State-sponsored’ cyberattackers are using malware on iPhones to spy in Thailand, Ghana, Uganda and El Salvador, Apple warns.