So is an Android phone. You're conflating two different concepts, as I've explained. Openness leads to good security; possibly better security than being closed. We have many years of evidence of that in desktop and server systems (where Apple does not have the best security record, by a long stretch).
iPhone can have good security, and be a walled garden. But, the two are not closely related, and it's disingenuous, or at least misinformed about computer security history, to suggest that they are closely related. Open systems can have good security, and be very open. They are orthogonal issues, and I'm surprised that people here would make the mistake of believing they are the same thing.
And you're conflating two different definitions of security. We're not talking about remote root holes or buffer overflows when discussing phone security; we're talking about trojans and other maliciously designed apps which are downloaded and run voluntarily by the user. A walled garden does provide better security in this regard, as demonstrated by the iPhone having a perfect track record at almost 3 years in, and Android already having malware in it's App Store despite the platform still being in it's infancy.
iPhone can have good security, and be a walled garden. But, the two are not closely related, and it's disingenuous, or at least misinformed about computer security history, to suggest that they are closely related. Open systems can have good security, and be very open. They are orthogonal issues, and I'm surprised that people here would make the mistake of believing they are the same thing.