The iOS 4 Architecture and SDK Frameworks
Previous | Table of Contents | Next |
The Anatomy of an iPhone 4 | The iPhone iOS 4 Cocoa Touch Layer |
Learn SwiftUI and take your iOS Development to the Next Level |
In The Anatomy of an iPhone 4 we looked at the hardware that is contained within an iPhone 4 device. When we develop apps for the iPhone Apple does not allow us direct access to any of this hardware. In fact, all hardware interaction takes place exclusively through a number of different layers of software that act as intermediaries between the application code and device hardware. These layers make up what is known as an operating system. In the case of the iPhone, this operating system is known as iOS.
In order to gain a better understanding of the iPhone development environment, this chapter will look in detail at the different layers that comprise the iOS operating system and the frameworks that allow us, as developers, to write iPhone applications.
iPhone OS becomes iOS
Prior to the release of the iPad in 2010, the operating system running on the iPhone was referred to as iPhone OS. Given that the operating system used for the iPad is essentially the same as that on the iPhone it didn’t make much sense to name it iPad OS. Instead, Apple decided to adopt a more generic and non-device specific name for the operating system. Given Apple’s predilection for names prefixed with the letter ‘i’ (iTunes, iBookstore, iMac etc) the logical choice was, of course, iOS. Unfortunately, iOS is also the name used by Cisco for the operating system on its routers (Apple, it seems, also has a predilection for ignoring trademarks). When performing an internet search for iOS, therefore, be prepared to see large numbers of results for Cisco’s iOS which have absolutely nothing to do with Apple’s iOS.
An Overview of the iOS 4 Architecture
As previously mentioned, iOS consists of a number of different software layers, each of which provides programming frameworks for the development of applications that run on top of the underlying hardware.
These operating system layers can be presented diagrammatically as illustrated in the following figure:
Some diagrams designed to graphically depict the iOS software stack show an additional box positioned above the Cocoa Touch layer to indicate the applications running on the device. In the above diagram we have not done so since this would suggest that the only interface available to the app is Cocoa Touch. In practice, an app can directly call down any of the layers of the stack to perform tasks on the physical device.
That said, however, each operating system layer provides an increasing level of abstraction away from the complexity of working with the hardware. As an iOS developer you should, therefore, always look for solutions to your programming goals in the frameworks located in the higher level iOS layers before resorting to writing code that reaches down to the lower level layers. In general, the higher level of layer you program to, the less effort and fewer lines of code you will have to write to achieve your objective. And as any veteran programmer will tell you, the less code you have to write the less opportunity you have to introduce bugs.
Now that we have identified the various layers that comprise iOS 4 we can now look in more detail at the services provided by each layer and the corresponding frameworks that make those services available to us as application developers.
iPhone iOS 4 Development Frameworks
Now that we have identified the various layers that comprise the iPhone OS we can now look in more detail at the services provided by each layer and the corresponding frameworks that make those services available to us as app developers. For details refer to the following chapters:
Learn SwiftUI and take your iOS Development to the Next Level |
Previous | Table of Contents | Next |
The Anatomy of an iPhone 4 | The iPhone iOS 4 Cocoa Touch Layer |