IOS framework (6)-core OS layer

Source: Internet
Author: User
Tags openssl library

Core OS layer

The underlying functions of the core OS layer are the basis for building many other technologies. Normally, these functions are not directly applied to applications, but to other frameworks. However, when directly processing security transactions or communicating with a peripheral, it must be applied to the framework at this layer.

Accelerate framework

IOS 4.0 introduces the accelerate framework (Accelerate.framework). The framework interface can be used to perform mathematical, big numbers, and DSP operations. Compared with the libraries compiled by developers, the framework has the advantage that it has been optimized based on the hardware configurations of various iOS devices. Therefore, you only need to code it once to ensure that it runs efficiently on all devices.

For more information about the accelerate framework, seeAccelerate framework reference.

External accessory framework

IOS 3.0 introduces the external accessory framework (ExternalAccessory.framework) To support communication between iOS devices and bound attachments. The attachment can be connected to the device through a 30-pin pedestal interface or through Bluetooth. With the external accessory framework, you can obtain information about each peripheral and initialize a communication session. After the communication Session Initialization is complete, you can use the commands supported by the device to directly operate it.

For more information about how to use the external accessory framework, seeExternal
Introduction to accessory Programming
. For more information about related classes in the external accessory framework, seeExternal
Accessory framework reference
. For details about how to develop iOS device attachments, visit http://www.apple.com.cn.

Security Framework

The IOS system not only provides built-in security functions, but also providesSecurityFramework (Security.frameworkIs used to ensure the security of the data managed by the application. This framework provides interfaces for managing certificates, public keys, private keys, and trust policies. It supports generating encrypted pseudo-random numbers. At the same time, it also supports saving certificates and keychain keys, and is a secure repository for sensitive user data.

The commoncrypto interface also supports symmetric encryption, HMAC, and digests. In fact, the functions of digests are compatible with common functions of the OpenSSL library, but IOS cannot use the OpenSSL library.

In IOS 3.0 and later versions, you can allow multiple applications created to share certain keychain items so that applications in the same suite can interact smoothly. For example, you can share the user password and other elements between applications. In this way, you do not need to prompt the user separately in each application. If the application needs to share data, the xcode project of each application must be properly qualified.

For more information about the functions and features of the security framework, seeSecurity
Framework reference
. For details about how to access the keychain, seeKeychain Service Programming Guide. For more information about how to set the application qualification in the xcode project, seeIOS
Development Guide
. For more information about which application qualifications can be configured, seeKeychain service referenceInSecItemAddFunction.

System

The system layer includes the kernel environment, driver, and the underlying UNIX interface of the operating system. The kernel is based on Mach and is responsible for all aspects of the operating system, including managing the virtual memory, threads, file systems, networks, and inter-process communication of the system. The driver contained in this layer is the interface between the system hardware and the system framework. For security considerations, the kernel and driver only allow access to a few system frameworks and applications.

Applications can useLibSystemLibrary to access a variety of underlying features of the operating system.LibSystemThe library interface is based on the C language and can support the following functions:

  • Threads (POSIX Threads)

  • Network (BSD sockets)

  • File System Access

  • Standard I/O

  • Bonjour and DNS services

  • Region Information

  • Memory Allocation

  • Mathematical computing

Header files of many core OS technologies are located in<Ios_sdk>/usr/include/Directory,<Ios_sdk>Is the path of the target sdk in the xcode installation directory. For more information about the functions associated with these technologies, visitIOS manual page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.