Which iPhone OS Version should your app support

One decision you need to make when developing an app is the minimum OS version that you will target. Sometimes the decision is made easy if you need to use a feature that is only available in certain versions of the OS. So for example the major differences and additions in iPhone OS versions 3.0 and 3.1 were as follows:

iPhone OS 3.1

Significant additions to the Camera API to support overlays and interaction with the camera. Video editing (3GS models only). A number of important fixes to core data and the NSFetchedResultsController. Additions and enhancements to HTTP live streaming, core audio and core animation.

iPhone OS 3.0

This was a major update from 2.x introducing a huge number of new frameworks and features including Apple Push Notification service, In App Purchase, Game Kit, Map Kit, iPod Library Access, Audio recording, Core Data, external accessory, In App Email, Streaming video, shared keychain items, accessibility support. compass support, OpenGL ES 2.0.

How many people are still using iPhone OS 2.x?

Of course if your app is very simple and does not make significant use of any of the above features you may be tempted to target OS v2.2 as your minimum version. If you do you should consider keeping at least one device at that OS version for testing. However given that the Apple world will soon be moving to OS 4.0 you need to ask if it is worth the effort.

One source of information that is worth considering is the number of people still using the older OS versions. Apple has been pretty successful in getting people to upgrade. Even iPod Touch users who have often had to pay for the upgrades do seem to stay current. The March 2010 Mobile Metrics report from AdMob provides a really interesting breakdown by iPhone OS version:

v3.1.3 - 44%
v3.1.2 - 42%
v3.1.1 - 1%
v3.1   - 3%
v3.0.1 - 1%
v3.0   - 4%
v2.x + 1.x - 5%

So only 5% of iPhone and iPod Touch users worldwide are still using v2.x. If you target iPhone OS 3.0 as your minimum version you will cover 95% of the user population and be able to exploit all the new frameworks that release introduced.

For me the sweet spot right now is iPhone OS 3.1, especially if you are using core data. It still covers 90% of the user population and does not require you to maintain an excessive number of test devices. In fact if you accept the data from AdMob most of your users will be on at least 3.1.2.

It is worth noting that the above data does not include the impact of the iPad and iPhone OS 3.2. However until we see a release of OS 4.x that brings everything back together 3.2 is an iPad specific release. So if you want to cover all angles your best bet would be to build a Universal App targeting OS 3.2 on the iPad and OS 3.1 or later on the iPhone.