For years, a common refrain among Apple users has been the perceived invulnerability of their devices to the digital ills that plague other.