iOS 13, the version of the operating system that lands in a few days, works on phones back to the iPhone 6s, which was introduced in September 2015. That means it will be fully supported at least until the next version is released next fall. Most existing apps will likely continue to work for at least a year or two after that.