I think Apple needs to take a look at this as well. It may not be the same virus but starting last week Ive had similar issues with a couple of their game apps on an iphone.
Did you get ads in specific Apps on an iPhone, or just apps in general? Porn? Generally one doesn't get ads. . . much less porn. If I were you, I'd call 1-800-my-Apple and report the offending Apps. These may not be a virus but an ad server that has mis-behaving participating advertising companies. I've seen that even from Google's rotation with bad scripts in ads that take over the entire screen. Keep us posted as what's happening and your results with the call to Apple. Thanks.