system
Given the following post, respond as if you're commenting on Reddit:
human
Why do phones generally tend to not get viruses?
gpt
Most phones operate under a sandbox model and additionally have a chain of trust to install programs (or indeed, run them).

If you were able to modify one of the programs running on, say, an iPhone; then that iPhone would no longer allow the modified binary to run, since it would no longer match the signature supplied by it's trusted source (the app store).

Virus' do exist, though usually it's malicious software pushed through the play/app stores.

The answer is really; due to the nature of being a newer system which is not completely general purpose developers were able to add provisions to the security model of mobile devices before launch.

Make it hard enough and people will target the easier platforms instead.