IOS technology Overview

Source: Internet
Author: User
What does the iPhone SDK contain?

Apple released most of the system interfaces to the special data packets such as the framework. A framework is a directory that contains a dynamic shared library and resources required to use the library (such as header files, images, and help applications ). To use a framework, you need to link it to the application project, similar to using other shared libraries. In addition, you need to tell the development tool where to find the framework header file and other resources.

In addition to the framework, Apple also publishes some technologies in the form of a standard shared library. Because iOS is UNIX-based, many underlying technologies of the operating system are sourced from open-source technologies, and many interfaces of these technologies can be accessed from the standard library and Interface directory.

 

Cocoa Touch Layer

Cocoa TouchThe layer contains the key frameworks required to create iOS applications. This layer technology is required to provide the underlying foundation for implementing the visual interface of applications and interacting with advanced system services. When developing an application, do not use a lower-layer framework as much as possible.

 

Multi-task

Although the application will be suspended when it enters the background, it can continue to run in the background using the following technologies:

  • Applications can request a certain amount of time to complete some important tasks.

  • Applications can declare that a certain service they support requires regular background execution time.

  • Applications can use local notifications to send notifications to users at a specified time. This method is not required for running the application.

No matter whether the application is suspended or running in the background, no extra work is required to support multiple tasks. However, in some cases (such as insufficient memory), the application may end running. Therefore, the application should be able to exit at any time. This means that many tasks that need to be executed when the application exits must be executed when the application switches to the background. This requires you to implement some new methods in the application delegate to switch the status of the Response Program.

 

Data Protection

Applications that deal with sensitive user data can use the built-in encryption function of the device (some devices may not provide the built-in encryption function) to protect data. If the application specifies that a file is protected, the system will save the file in encrypted format on the disk. When the device is locked, your application and other potential intruders cannot access the file, the system generates a key for your application to access the file.

If you need to implement data protection, applications should work hard to create and manage the data to be protected. It must be able to secure data when it is created and adapt to changes in file accessibility caused by Device Locks or unlocks.

 

Apple push notification service

From the design point of view, let the application support push notification contains two parts. First, the iOS application needs to request the system to send a notification to it, and then reasonably configure the application delegate so that it can properly process the notification. These tasks can be delegated through the application andUIApplicationObject cooperation is completed. Second, you need to provide a server-side process to generate the initial notification. This process runs on your local server. It works with the apple push notification service to generate initial notifications.

 

Local notification

IOS 4.0 introduces local notifications. A local notification is a supplement to an existing push notification. A common program can generate a notification locally without relying on an external server. When an important event occurs, background applications can use local notifications to attract user attention. For example, a background navigation application can use a local notification to remind users of turning. Applications can also schedule to send local notifications to users at some point in the future, and sending these notifications does not require the application to be in the running state.

Local notifications are independent of your applications. Once a notification is scheduled, the system will send the notification. In addition, when sending notifications, your application does not need to be in the running state.

 

Gesture Reader

IOS 3.2 introduces a gesture identification device. A gesture identification device is an object bound to a view. It is used to detect common gesture types. After you bind a gesture identification device to a view, you can tell it what action to perform when a gesture occurs. Then, the gesture reader can track the original event and identify the gesture according to the system-defined testing method. To recognize a gesture before introducing the gesture reader, you need to track the original Touch event stream of the view, and then use a complex test method to determine whether these events represent a gesture.

Now, the UIKit framework containsUIGestureRecognizerClass, which defines the basic behavior of all gesture identifiers. You can use a custom gesture identification subclass or a subclass defined by the system to process the following standard gestures:

  • Click (any number of clicks)

  • Inside or outside (for scaling)

  • Shake or drag

  • Touch (in any direction)

  • Rotate (move your finger in the opposite direction)

  • Long press

To learn more about the gesture identifiers you can use

 

File Sharing support

Applications can use file sharing to allow users to access user data files of programs. File sharing allows applications to expose applications to users through iTunes/DocumentsDirectory. In this way, users can move files back and forth between iPad and desktop computers. However, this feature does not allow applications and other applications on the same device to share files. To share files between programs, use the clipboard or document interaction controller object.

You can use the following steps to make the application support file sharing:

  1. InInfo.plistFileUIFileSharingEnabledAnd set the key valueYES.

  2. Place the file you want to share inDocumentsDirectory.

  3. Once the device is inserted into your computer, iTunes 9.1 displays a File Sharing area in the Apps tab of the selected device.

  4. After that, you can add files to the directory or move the files to the desktop.

If the application supports file sharingDocumentsAfter the directory, the application should be able to identify and make appropriate responses. For example, an application can display the content of a new file on the interface. Do not display the file list of the directory to users and ask them what operations they want to perform on the file.

 

Point-to-Point Service

In iOS 3.0 and later versions, the Game Kit framework supports point-to-point connections through Bluetooth. You can use a point-to-point connection to start a communication session with a neighboring device, or use it to implement common features of multiple multiplayer games. Although point-to-point connections are mainly used in games, you can also apply them to other types of applications.

 

Standard System View Controller

Many Cocoa Touch layer frameworks contain view controllers that display standard system interfaces. We recommend that you use these view controllers in your applications to provide a consistent user experience for your applications and systems. To perform the following tasks, select a view controller from the framework:

  • Display or edit contact information-Use the View Controller in the Address Book UI framework.

  • Create or edit calendar events-Use the View Controller of the Event Kit UI framework.

  • Create an email or SMS message-Use the View Controller in the Message UI framework.

  • Open or preview the content of a file-UseUIDocumentInteractionControllerClass.

  • Select a photo from your photo library-UseUIImagePickerControllerClass.

  • Video Clip shooting-UseUIImagePickerControllerClass.

To learn how to select a View Controller, seeIOS View Controller Programming Guide. For details about the interface displayed by a specific view controller, refer to the corresponding framework reference.

 

External Device Support

Devices installed with iOS 3.2 can connect to an external display device through a set of cables supported by devices. When an external device is connected, the application can use its display to display the content. The screen information, including the resolution supported by the screen, can be obtained through the interface of the UIKit framework. You can also associate an application window to a screen through this framework.

  • UIScreenClass is used to obtain the screen objects of all current screens (including the device's main screen. A screen object contains screen attributes (including screen features that take the screen size and pixel ratio into account ).

  • You canUIScreenModeClass to obtain information about a screen with a specific size pixel ratio.

  • You canUIWindowClass) to a specific screen. To display the content as an image, you must provide two independent windows to display the same content.

For more information about the support provided by the above classes, seeUIKit framework referenceClass description.

 

Framework included in the Cocoa Touch layer Address Book UI framework Event Kit UI framework Game Kit framework iAd framework Map Kit framework

Imported for iOS 3.0Map KitFramework (MapKit.framework. You can add custom information in the view and embed it into the application view, you can set attributes of a map by programming (including the area displayed on the current map and the user's location ). You can also highlight certain areas or additional information in the map using custom or standard annotations (for example, using a needle tag.

In the iOS 4.0 system, the framework supports drag-and-drop tagging and custom overwriting. You can drag a tag to allow you to relocate the location of a tag programmatically or through user interaction. A cover layer can be used to create complex map annotations composed of multiple points. Covering layers can be used to display the map surface, such as bus routes, election maps, park boundaries, or meteorological information (such as radar data.

For more information about the classes in the Map Kit framework, seeMap Kit framework reference.

Message UI framework UIKit framework media layer graphics technology

The simplest and most effective way to create an application is to use a previously rendered image, with the standard view and the control of the UIKit framework, and then hand over the rendering task to the system for execution. However, in some cases, you may need some features that are not available in the UIKit and customize certain behaviors. In this case, you can use the following technology to manage the graphic content of an application:

  • Core Graphics (also known as Quartz) is used to process local 2D vector rendering and image rendering.

  • Core Animation (part of the Quartz Core framework) provides higher levels of support for Animation views and other content.

  • OpenGL ES provides support for 2D and 3D rendering using hardware acceleration interfaces.

  • Core Text provides a precise Text layout and rendering engine.

  • Image I/O, which provides interfaces for reading and writing most Image formats.

  • The Assets Library framework allows you to access photos and videos in your photo Library.

Most applications can run on devices with high-resolution screens with minimal modifications or no changes required. Because when drawing or operating a view, the coordinate value you specified will be mapped to the logical coordinate system, which is not associated with the underlying screen resolution. In addition, the drawn content is automatically scaled proportionally as needed to support high-resolution screens. For vector-based code, the system framework automatically uses additional pixels to improve the image content and make it clearer. If an image is used in the application, you can use UIKit to automatically load the high-resolution version of the existing image.

Audio Technology

Remember to select an advanced framework as much as possible because they simplify the work required to play audio. The frameworks listed below are sorted from advanced to low. The Media Player framework (framwork) provides the most advanced interfaces:

  • Media Player framework. This framework makes it easy to access your iTume library and supports playing tracks and playlists.

  • AV Foundation framework. It provides a set of easy-to-use Objective-C interfaces for managing audio playback or recording ..

  • OpenAL framework. It provides a set of cross-platform interfaces for publishing azimuth audio.

  • Core Audio framework. It provides simple and precise interfaces for playing or recording audio content. You can use these interfaces to play the system's alarm sound, trigger the standby vibration function, manage multi-channel buffering and playback, and stream audio content.

 

Video technology

When selecting video technology, select the advanced framework as much as possible, because the advanced framework can simplify the work required to provide support for a certain function. The frameworks listed below are arranged from advanced to low. The Media Player framework provides the most advanced interfaces:

  • Media Player framework, which provides a set of easy-to-use interfaces for playing full-screen or partial-screen movies in an application.

  • AV Foundation framework, which provides a set of Objective-C interfaces to manage the capture and playback of movies.

  • Core Media framework, which describes the underlying types used by higher-level frameworks and provides some underlying interfaces for Media processing.

 

Core Services Layer

The Core Services layer provides basic system Services for all applications. Maybe applications do not directly use these services, but they are the foundation of many parts of the system.

The following sections describe some of the more common features that may be intended for your application to support.

Block object: SQLiteXML support for the In App Purchase positioning service In the Grand Central Dispatch Application

 

Core Foundation framework

Core Foundation framework(CoreFoundation.frameworkIs a set of C language interfaces that provide basic data management and service functions for iOS applications. The following lists the data and services that the Framework supports for management:

  • Group data type (array, set, etc)

  • Package

  • String Management

  • Date and Time Management

  • Raw data block management

  • Preference Management

  • URL and data stream operations

  • Thread and RunLoop

  • Port and soket Communication

The Core Foundation framework is closely related to the Foundation framework. They provide interfaces for the same functions, but the Foundation framework provides Objective-C interfaces. If you mix the Foundation object with the Core Foundation type, you can use the "toll-free bridging" between the two frameworks ". The so-calledToll-free bridgingIt means that you can use some types in the Core Foundatio and Foundation frameworks at the same time in the methods or functions of a framework. Many data types support this feature, including group and string data types. The class and type descriptions of each framework describe whether an object is toll-free bridged and what object to bridge.

 

Foundation framework

Foundation framework(Foundation.frameworkProvides Objective-C encapsulation for many features of the Core Foundation framework. You can refer to the Core Foundation framework for a description of the previous Core Foundation framework. The Foundation framework supports the following features:

  • Group data type (array, set, etc)

  • Package

  • String Management

  • Date and Time Management

  • Raw data block management

  • Preference Management

  • URL and data stream operations

  • Thread and RunLoop

  • Bonjour

  • Communication Port Management

  • Internationalization

  • Regular Expression matching

  • Cache support

 

Core OS-layer Accelerate framework External Accessory framework Security framework System

 

Framework in iOS framework Devices

Table B-1 describes the frameworks provided by iOS devices that are located in<Xcode>/Platforms/iPhoneOS.platform/Developer/SDKs/<IOS_SDK>/System/Library/FrameworksDirectory. Path<Xcode>Indicates the installation directory of Xcode,<IOS_SDK>Indicates the target SDK version.

Simulator framework

The framework of the device and simulator is slightly different. The simulator uses several Mac OS X frameworks as part of its own implementation. In addition, due to system restrictions, the exact interface of the device framework may be slightly different from that of the simulator framework.

System Library

Note that the iOS system may not package some special libraries in the Core OS and Core Services layers into a framework, but place them as dynamic libraries in the system/usr/libDirectory. Dynamic shared library passed.dylibExtension identifier. the header file is located in/usr/includeDirectory.

All versions of the iPhone SDK contain a local copy of the dynamic shared library installed on the system. These copies are installed in your development system and can be linked from the XCode project. To view the dynamic library list of a specific version, View<Xcode>/Platforms/iPhoneOS.platform/Developer/SDKs/<IOS_SDK>/usr/lib. In this path,<Xcode>Indicates the installation directory of Xcode,<IOS_SDK>Indicates that you are using an SDK of a specific version.

IOS uses symbolic links to point to the latest library version. When linking a dynamic shared library, use the symbolic link instead of the dynamic library specific version link. In the future iOS version, the Library version may change. If your software is connected to a specific version that may no longer exist in your system, the problem may occur.

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.