Apple is urging iPhone and iPad users to update to its newest operating systems to keep their devices safe.