Apple has officially committed to at least 5 years of iPhone security updates. Samsung and Google offer two extra years for Android updates.
Apple promises at least 5 years of iPhone security updates, but Samsung and Google offer longer support for Android updates