The iOS architecture
iOS is an intermediary between the device hardware components and the applications on the screen. The applications don't interact with the underlying hardware directly. Instead, they do it through a well-defined system interface that protects them from hardware changes. This abstraction makes it easy to build applications that work on devices with different hardware capabilities.
The iOS architecture consists of four layers: the Cocoa Touch layer, the Media layer, the Core Services layer, and the Core OS layer. Each layer consists of several frameworks that help to build an application, as illustrated in the following diagram:
These layers can be described as follows:
Cocoa Touch: This layer contains the key frameworks required to develop the visual interface for iOS applications. Frameworks in this layer provide the basic application infrastructure and support key technologies, such as touch-based input, multitasking, and many high-level system services.
Media: This layer provides the graphics, audio, and video frameworks to create the best multimedia experience available on a mobile device. The technologies in this layer help developers to build applications that look and sound great.
Core Services: This layer provides the fundamental system services that are required for the applications. Not all of these services are used by developers, though many parts of the system are built on top of them. This layer contains technologies that enable support for location services, iCloud, and social media.
Core OS: This layer is the base layer and sits directly on top of the device hardware. This layer deals with low-level functionalities and provides services such as networking (Berkeley Software Distribution (BSD) sockets), memory management, threading (Portable Operating System Interface (POSIX) threads), filesystem handling, external accessories access, and Inter Process Communication (IPC).
Now that we have learned about the iOS architecture, let's have a look at iOS security.