Objective
- iOS is a UNIX-based operating system, and it borrows heavily from MacOS's kernel, and iOS optimizes hardware for mobile devices such as batteries, but it can still be seen as a UNIX system.
1. IOS system Level
The iOS system uses the concept of layers to divide the technical implementation of the system, each layer is composed of its own framework, iOS from bottom to top can be divided into four layers: core OS, Core service layer, media layer and Cocoa Touch layer.
| level |
Main Framework |
| Cocoa Touch |
UIKit, etc. |
| Media |
Core Graphics, OpenGl ES, Core Animation, and more |
| Core Services |
Core Data, Foundation, etc. |
| Core OS |
Accelerate framework, External accessory Framework, Security Framework, System, etc. |
As you can see, it takes more than just the language itself to write a molded product, and many libraries need to work together. Language is only a product development "glue", and the framework and the above libraries are the skeleton of IOS products. The Swift language makes it possible to call all libraries seamlessly.
1.1 Core OS---kernel OS layer
The core OS layer contains several frameworks, such as the accelerate framework, the External accessory framework, the Security framework, and the System, which are basically C-based interfaces.
The core OS layer is the closest to the operating system, at this level, the main implementation of hardware and operating system interface encapsulation.
Core OS layers typically perform threading, complex math operations, and hardware encryption.
1.2 Core Services---key service tiers
The core service layer includes the Address Book framework, the Cfnetwork framework, the core Data framework, the core Foundation framework, the core location framework , core Media Framework, Core Telephony framework, Event Kit Framework, Foundation Framework, Mobile Core Services Framework, Quick look Framework, Store Kit framework, System Configuration Framework, Block Objects, Grand Central Dispatch, in App Purch Some frameworks, such as ASE, location Services, SQLite, and XML support, are basically C-based interfaces.
The Foundation Framework provides strings, numeric management, containers and enumerations, distributed computing, event loops, URL and data flow operations, internationalization, and other functions that are not directly related to the graphical user interface. Where classes and constants are commonly used as "NS" prefixes to flag.
The core data framework plays a major role in the database model and data storage. While the program is running, the Core data framework creates and manages instances of the model, as well as providing a data model access interface to the outside. In addition to this, Core data can also store data in the SQLite database for performance optimizations, manage Undo/redo (undo/Redo), and to categorize, filter, and organize data in memory.
1.3 Media---medium layer
Media layer includes core Graphics, Core Animation, OpenGL ES, Core Text, Image I/O, Assets Library Framework, Media Player framework, AV Found ation, OpenAL, core Audio frameworks, AV Foundation, Core Media, and more.
The media layer contains graphics technology (including animation technology), audio technology, and video technologies, which can be used to create advanced graphics and animations faster, with easy access to audio and video support.
-
1) Graphics technology: An important part of an IOS application. The simplest and most efficient way to create an application is to use a pre-rendered picture, with a standard view and a control of the UIKit framework, and then hand the drawing task to the system for execution.
- Core Graphics: Also known as Quartz, handles local 2D vector rendering and picture rendering. Part of the
- core Animation:quartz Core framework to provide higher levels of support for animated views and other content.
- OpenGl ES: Provides support for 2D and 3D rendering using hardware-accelerated interfaces.
- Core Text: Provides a sophisticated text layout and rendering engine.
- image I/O: provides interfaces for reading and writing most graphics formats, importing and exporting image data and image metadata.
- Assets Library framework: Asset Library frame for accessing photos and videos in the user photo gallery.
-
2) Audio technology: IOS audio technology can be used to play or record high-quality audio, or to trigger the device's vibration function.
- Media Player framework: is a ready-to-use player.
- AV Foundation: Provides an interface for managing audio playback or recording.
- Core Audio: You can use the interface of this framework to play the system's alarm sound, triggered vibration, manage multi-channel buffering and playback, and stream audio content.
-
3) video technology: can be used to play the movie files that the application contains, as well as the data flow content from the network. If your device has the right video hardware, these technologies can also be used to capture video and integrate the captured video into your application.
- Media Player frame: A movie that can be used to play a full-screen or partial screen in an application.
- AV Foundation: You can manage the capture and playback of movies.
- Core Media: Describes the underlying types used by higher-level frameworks, and also provides some underlying interfaces for processing media.
1.4 Cocoa Touch---Cocoa touch layer
The Cocoa Touch layer includes the Address Book UI Framework, the Event Kit UI Framework, the Game Kit framework, the IAD framework, the MAP Kit framework, the MESSAG E UI Framework, UIKit framework, and so on, this layer is basically a objective-c-based interface.
The Cocoa Touch layer contains classes built for the graphical interface for IOS app development. All of these classes are prefixed with "UI".
Cocoa is a generic term for the Apple development system, and Cocoa contains some of the main OC object libraries, which we call the framework. A framework is a collection of many classes, methods, functions, and documents that are organized in a logical way to make it easier to develop programs. The framework that lays the groundwork for all program development is called the Foundation framework.
- Term Cocoa: Refers to the Foundation, Core Data, and AppKit (Application Kit) framework framework. For application development on MacOS devices.
- The term Cocoa Touch: refers to the Foundation, Core Data, and UIKit framework. For application development on IOS devices.
IOS system Level