Core OS Layer
The Core OS layer contains the low-level features that most other technologies are built upon. Even if you do not use these technologies directly in your apps, they are most likely being used by other frameworks. And in situations where you need to explicitly deal with security or communicating with an external hardware accessory, you do so using the frameworks in this layer.
The Accelerate framework (
Accelerate.framework) contains interfaces for performing digital signal processing (DSP), linear algebra, and image-processing calculations. The advantage of using this framework over writing your own versions of these interfaces is that they are optimized for all of the hardware configurations present in iOS devices. Therefore, you can write your code once and be assured that it runs efficiently on all devices.
For more information about the functions of the Accelerate framework, see Accelerate Framework Reference.
Core Bluetooth Framework
The Core Bluetooth framework (
CoreBluetooth.framework) allows developers to interact specifically with Bluetooth low energy (LE) accessories. The Objective-C interfaces of this framework allow you to do the following:
Scan for Bluetooth accessories and connect and disconnect to ones you find
Vend services from your app, turning the iOS device into a peripheral for other Bluetooth devices
Broadcast iBeacon information from the iOS device
Preserve the state of your Bluetooth connections and restore those connections when your app is subsequently launched
Be notified of changes to the availability of Bluetooth peripherals
For more information about using the Core Bluetooth framework, see Core Bluetooth Programming Guide and Core Bluetooth Framework Reference.
External Accessory Framework
The External Accessory framework (
ExternalAccessory.framework) provides support for communicating with hardware accessories attached to an iOS-based device. Accessories can be connected through the 30-pin dock connector of a device or wirelessly using Bluetooth. The External Accessory framework provides a way for you to get information about each available accessory and to initiate communications sessions. After that, you are free to manipulate the accessory directly using any commands it supports.
For more information about how to use this framework, see External Accessory Programming Topics. For information about developing accessories for iOS-based devices, go to the Apple Developer website.
Generic Security Services Framework
The Generic Security Services framework (
GSS.framework) provides a standard set of security-related services to iOS apps. The basic interfaces of this framework are specified in IETF RFC 2743 and RFC 4401. In addition to offering the standard interfaces, iOS includes some additions for managing credentials that are not specified by the standard but that are required by many apps.
For information about the interfaces of the GSS framework, see the header files.
Local Authentication Framework
The Local Authentication Framework (
LocalAuthentication.framework) lets you use Touch ID to authenticate the user. Some apps may need to secure access to all of their content, while others might need to secure certain pieces of information or options. In either case, you can require the user to authenticate before proceeding. Use this framework to display an alert to the user with an application-specified reason for why the user is authenticating. When your app gets a reply, it can react based on whether the user was able to successfully authenticate.
For more information about the interfaces of this framework, see Local Authentication Framework Reference.
Network Extension Framework
The Network Extension framework (NetworkExtension.framework) provides support for configuring and controlling Virtual Private Network (VPN) tunnels. Use this framework to create VPN configurations. You can then start VPN tunnels manually or supply on-demand rules to start the VPN tunnel in response to specific events.
For more information about the interfaces of this framework, see the header files.
In addition to its built-in security features, iOS also provides an explicit Security framework (
Security.framework) that you can use to guarantee the security of the data your app manages. This framework provides interfaces for managing certificates, public and private keys, and trust policies. It supports the generation of cryptographically secure pseudorandom numbers. It also supports the storage of certificates and cryptographic keys in the keychain, which is a secure repository for sensitive user data.
The Common Crypto library provides additional support for symmetric encryption, hash-based message authentication codes (HMACs), and digests. The digests feature provides functions that are essentially compatible with those in the OpenSSL library, which is not available in iOS.
It is possible for you to share keychain items among multiple apps that you create. Sharing items makes it easier for apps in the same suite to interoperate smoothly. For example, you could use this feature to share user passwords or other elements that might otherwise require you to prompt the user from each app separately. To share data between apps, you must configure the Xcode project of each app with the proper entitlements.
For information about the functions and features associated with the Security framework, see Security Framework Reference. For information about how to access the keychain, see Keychain Services Programming Guide. For information about setting up entitlements in your Xcode projects, see Adding Capabilities in App Distribution Guide. For information about the entitlements you can configure, see the description for the
SecItemAdd function in Keychain Services Reference.
The system level encompasses the kernel environment, drivers, and low-level UNIX interfaces of the operating system. The kernel itself, based on Mach, is responsible for every aspect of the operating system. It manages the virtual memory system, threads, file system, network, and interprocess communication. The drivers at this layer also provide the interface between the available hardware and system frameworks. For security purposes, access to the kernel and drivers is restricted to a limited set of system frameworks and apps.
iOS provides a set of interfaces for accessing many low-level features of the operating system. Your app accesses these features through the
LibSystem library. The interfaces are C based and provide support for the following:
Concurrency (POSIX threads and Grand Central Dispatch)
Networking (BSD sockets)
Bonjour and DNS services
Header files for many Core OS technologies are located in the <iOS_SDK>
/usr/include/ directory, where <iOS_SDK> is the path to the target SDK in your Xcode installation directory. For information about the functions associated with these technologies, see iOS Manual Pages.
iOS was initially designed to support binary files on devices using a 32-bit architecture. In iOS 7, however, support was introduced for compiling, linking, and debugging binaries on a 64-bit architecture. All system libraries and frameworks are 64-bit ready, meaning that they can be used in both 32-bit and 64-bit apps. When compiled for the 64-bit runtime, apps may run faster because of the availability of extra processor resources in 64-bit mode.
iOS uses the LP64 model that is used by OS X and other 64-bit UNIX systems, which means fewer headaches when porting code. For information about the iOS 64-bit runtime and how to write 64-bit apps, see 64-Bit Transition Guide for Cocoa Touch.