iOS itself is a bit of a leaky sieve compared to android, in terms of security; a jailbroken iphone is much more hackable than an android phone. but as you say, it's their perimeter security which is the reason there are essentially close to zero viruses on the iphone. there's not enough jailbroken iphones to make it worth someone's while to write for them.