Yesterday, while browsing a supposedly mainstream news site on my iPhone 6, a popup claimed I had six viruses on my phone. It took a little trouble to make it go away, but it finally did.
This does appear to be the old “fake anti-virus software” problem well known to Windows users from a decade ago. I don’t see any evidence of tampering with any financial sites accessed from the phone (as I check them on varied environments frequently), and I don’t see any evidence of infection in any images or videos I moved to a windows machine for use (I did a full Trend Micro scan).
Nevertheless, I did a little check on the latest advice on iPhone and Mac malware, and here is a good article (although from 2012). The article has some interesting discussion of past security problems in the java language and virtual machine, which was all the rage fifteen years ago.
You may be able to get rid of an “adware” message from Safari by going to airplane mode and closing and reopening Safari (video above). This is similar to getting rid of a fake “system message” scareware browser hijack on a Windows machine.