Should We Optimize for Older Version of iOS?

When we are programming for a new mobile application, we come definitely come to this question: “Should we optimize for older version of iOS like 5.1, 5.0 or even 4.3?” This is an important question that I believe most of the Mobile Application development company have. Especially, there are some special requirements requested by the customers to optimize for all different versions of iOS.

Before we decide on whether we should optimize for older iOS versions or before we convince our clients on what iOS version that their apps should support, I believe we should know the current market share of the different iOS versions. From there, we will understand if we should invest our time to optimize for older iOS versions. From understand the market share trend, we are able to estimate the potential future trend.

Market Share of Different iOS Versions

From my research, Apple itself never releases the statistics and market share of its products. But, I found a few reliable sample statistics from some trustworthy mobile applications developers who released the statistics using their own apps or platform.

The First statistics is by David Smith from his own iOS App (Audiobooks). This app is one of the most popular iOS Application under the Book Genre. You can see the ranking statistics from App Data and App Annie: AudioBooks App Data and AudioBooks App Annie. This app is within the top 50 app in Book Genre for both iPhone and iPad version in all (Top Free, Top Grossing and Top Paid) categories in many different countries. I can’t find the download statistics by David, but I believe it is at least 100,000 downloads per week.

So, this 100,000 downloads per week is a good sample to know the marketshare of the iOS versions. The Last Update for the statistics was 23 July 2013 (About a week ago from this post):.

All Platforms:
iOS 6.X (6.0, 6.1): 91.2%
iOS 5.X (5.0, 5.1): 7.5%
iOS 4.X: 1.4%

iPhone Only:
iOS 6.X: 95.5%
iOS 5.X: 3.5%
iOS 4.X: 1.0%

iPad Only:
iOS 6.X: 86.6%
iOS 5.X: 12.2%
iOS 4.X: 1.6%

iPod Touch Only:
iOS 6.X: 81.8%
iOS 5.X: 15.6%
iOS 4.X: 2.6%

As you can see, people who own Apple gadgets update to the latest Operating System (OS) fairly fast. Over 90% of the users have the latest iOS version.

More details on iOS version marketshare by David Smith: iOS Version Stats

Another Statistics is from Unity3D, a 3D game engine that is able to deploy to multiple mobile platforms including iOS. Unity3D is quite a big company and there are many games are released under this game engine. I believe there are millions of devices running this game engine. The last updated date for the statistics was April 2013.

iOS 6.X (6.0, 6.1): 89.1%
iOS 5.X (5.0, 5.1): 9.5%
iOS 4.X: 1.4%

As you can see, we have close to 90% of the gadgets are running on the latest iOS version. Remember that this statistics is over 3 months old. I believe that the real statistics as of today (late July 2013) will definitely pass 90%.

You can see more details of the statistics here:-
Unity3D Mobile Hardware Statistics
iOS Version Stats by Unity3D

Decision to Optimize for Older iOS Version?

Based on the above statistics, I believe this decision is not hard to make. If your company has a lot of resources and time for a project, you might be able to optimize for all the older versions of iOS. But, it might not be worth it as the market share of the older iOS versions is not much (less than 10%). From my experience, gadgets that are still using older iOS versions might not be able to get the most out of your mobile apps even if they can download it. It is due to low memory storage and slower CPU speed. I have seen applications crashed due to low memory issue.

Personally, I believe that the time spent to optimize for older iOS version is not worth it. I would prefer to spend time to optimize for the best user experience for the gadgets with the latest version of iOS.

Apple Updates the iOS versions and Xcode Frequently

One thing that you have to know is that Apple updates the iOS versions and Xcode quite frequently. We can see the new version of iOS every year. Same with the Xcode. There are a few subversions updates for the same year.

Here are some examples of the different technologies in Xcode for different iOS versions:-
Only iOS 5 and above supports Storyboard (a technology inside the Xcode). If you are trying to optimize your application for older version (iOS 4.X), then you are not able to use this technology. Or you have to use your Application Delegate to use different technology when detecting different iOS versions.

Only iOS 6 and above supports Auto-Layout on the storyboard. And again, the app with auto layout will not be running on iOS 5.1 and below. So, if you want to optimize for both iOS 6.X and 5.X, you might need to have 2 different storyboards to do so.

Apple is a forward looking company. They will phrase out the support of the old version of iPhone/iPad when the time is right. So, I believe that we (as iOS Mobile Developer) should be forward looking as well. We should use the latest technologies provided by the Apple.

Simple Calculator iOS Application

The First assignment that I did when following the Stanford iPhone / iPad Development course was the Simple Calculator iOS Application. In this post, I am going to share every step in making this mobile application.

Create a New Project

First of all, launch the Xcode and create a new project using “Single View Application“.

Under Product Name, you may put “Calculator”. Put your name or your company’s name under organization name.

As for Company Identifier, it is usually the reverse characters of a web domain that you own. For example, if you own “” then you put it as “”. If you do not own any web domain, you can just put any domain such as “com.example”. It is not important for now if you just want to run the application on simulator. But, when you want to run the application on your mobile device, you should get your own domain. You will also need to do some provisioning settings on the Apple Developer Portal, attach the provisioning certificates on your Xcode before you can run it on your device and also submit the application to Apple. I will do tutorial on that in a later post)

Under the Class prefix, you can put it as “Calculator”. Choose “Universal” under Devices as we will build both iPhone and iPad app. Tick “Use Storyboards” and “Use Automatic Reference Counting (ARC)“. We want to use Storyboard as it is an important technology that simplifies the implementation of MVC in iOS. Before iOS 5, the developers have to take care of every object creation and destruction to manage the memory. But, Apple has released a new technology calls ARC which simplifies the memory management in Xcode.

After you click “Next”, you will be asking to choose a place that you want to create this project. I normally put it under a “Developer” folder just to keep everything organized. After you click “Create”, you will see a screen like the below screen shot:-

Your project will have 2 AppDelegate files (.h, .m), 2 storyboards (for iPhone and iPad) and 2 ViewController files (.h, .m). .H is a header file which can be accessed by public while .M is a implementation file which can only be accessed by the class itself (private).

The storyboards will contain all the views for our controllers. So, the initial project creation has given us both the view and also controller. We will create our own model later.

Creating Our Views

We will leave iPad storyboard for now until the end of the tutorial. So, let’s start with the iPhone storyboard. From the storyboard, you will see an iPhone size view controller object on the screen. When you click the “view” inside the view controller object, you may see the height for the view is 548. It is actually the iPhone 5 size. We can click a small screen toggle button on the bottom of the page to toggle it to normal iPhone height which is 460. We will optimize for iPhone 5 later. But for now, we just want to keep it simple and start with normal iPhone size.