What does the IPhone SDK contain?

Source: Internet
Author: User
Tags home screen

What does the IPhone SDK contain?

This article was reproduced from: http://www.cnblogs.com/jy578154186/archive/2013/02/27/2934881.html

The first part:

All the interfaces, tools, and resources needed to develop iOS applications on Macintosh computers using Intel chips are all included in the iphone SDK.

Apple has distributed most of its system interfaces to such special packets as the framework. A framework is a directory that contains a dynamic shared library and the resources needed to use the library (such as header files, images, and help applications). If you want to use a framework, you need to link it to the application project, which is similar to using a different shared library. In addition, you need to tell the development tool where to find the frame header files and other resources.

In addition to using frameworks, Apple publishes certain technologies in the form of standard shared libraries. Because iOS is based on Unix, many of the technologies underlying the operating system are sourced from open source technology, and many of these interfaces can be accessed from standard libraries and interface catalogs.

SDK also contains the following important components:

Xcode Tools -provides IOS application development tools, including the following key applications:

Xcode-is an integrated development environment that is responsible for managing application engineering. It allows you to edit, compile, run, and debug your code. Xcode also integrates many other tools, which are the main applications used in the development process.

Interface Builder -a tool for visually assembling user interfaces. interface objects created through Interface Builder will be saved to a resource file in a particular format and loaded into the application at run time.

Instruments -run-time profiling and debugging tools. You can use Instruments to gather information about the behavior of your application while it is running, and take advantage of this information to identify possible problems.

IPhone Simulator -a Mac OS x platform application that simulates the iOS technology stack so that you can test your iOS application on an Intel-based Macintosh computer.

IOS Reference Library -The SDK includes the reference documentation for iOS by default. Also, if the document library has an update, the update is automatically downloaded locally. You can see the reference library by selecting Help > Developer documentation.

The SDK provides the software needed to write the application, and Xcode and Instruments allow you to interact directly with the bound device, run and debug the code on the target hardware . If you need to develop on a real-world device, please join Apple's paid iphone developer program and configure the device for development purposes. To learn more about the iphone developer program, ask your itch-iOS training Professional teacher.

If you need to know how to install the iphone SDK and how to develop an iOS app using the iphone SDK, please refer to the iOS Development Guide. If you know more about the framework of iOS and want to know where to find the underlying system libraries, refer to the iOS framework. "itch-iOS Training Professional Academy"

Part II:

What does the IPhone SDK contain?

Apple has distributed most of its system interfaces to such special packets as the framework. A framework is a directory that contains a dynamic shared library and the resources needed to use the library (such as header files, images, and help applications). If you want to use a framework, you need to link it to the application project, which is similar to using a different shared library. In addition, you need to tell the development tool where to find the frame header file and other resources

In addition to using frameworks, Apple publishes certain technologies in the form of standard shared libraries. Because iOS is based on Unix, many of the technologies underlying the operating system are sourced from open source technology, and many of these interfaces can be accessed from standard libraries and interface catalogs.

Cocoa Touch Layer

The Cocoa Touch layer contains the key frameworks needed to create an iOS application. Up to implementing the application visual interface, down to interacting with advanced system services, requires that layer of technology provide the underlying foundation. When developing an application, try not to use the underlying framework as much as possible, and use the framework of that layer whenever possible.

Multi-tasking

Although the application will be suspended in the background, the following techniques can be used to keep it running in the background:

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

    • An application can declare that a service it supports needs to receive periodic background execution time.

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

Whether the application is suspended or running in the background, there is no additional work required to support multitasking. However, under certain circumstances, such as insufficient memory, the application may end up running. Therefore, the application should be able to exit at any time. This means that many of the tasks that need to be performed when exiting an application must be changed to execute when the application switches to the background. This requires that you implement some new methods in the application delegate in response to the state switch of the program.

Data protection

Applications that work with sensitive user data can protect data using in-device encryption (some devices may not provide built-in encryption capabilities). If the application specifies that a file is protected, the file is saved to disk in an encrypted format. When the device is locked, your application and other potential intruders cannot access the file, and when the user unlocks the device, a key is generated so that your application can access the file.

For data protection, applications should do something about how to create and manage the data they want to protect. It must be able to secure it at the time the data is created, and it needs to adapt to changes in file accessibility caused by device lockout or unlocked.

Apple Push Notification Service

From a design perspective, let the application support push notifications with two parts. First, the iOS application needs to ask the system to send a notification to it, and then it is reasonable to configure the application delegate so that it can properly handle the notification. These work can be done through application delegation and UIApplication object collaboration. Second, you need to provide a server-side process to generate the initial notification. The process runs on your own local server, and it works with the Apple push Notification service to produce the initial notification.

Local notifications

IOS 4.0 introduces a local notification. A local notification is a supplement to an existing push notification that can be generated locally by a generic program, eliminating the need to rely on an external server. When important events occur, background applications can take advantage of local notifications to gain user attention. For example, a navigation application running in the background can use local notifications to remind users to turn. The application can also schedule a local notification to be sent to the user at some point in the future, and sending these notifications does not require the application to be in a running state.

The advantage of local notifications is that it is independent of your application. Once a notification has been scheduled, the system will be responsible for sending notifications. And when you send a notification, your application doesn't need to be in a running state

Gesture recognizer

IOS 3.2 introduces a gesture recognizer. A gesture recognizer is an object that is bound to a view to detect common gesture types. When you bind a gesture recognizer to a view, you can tell it what action to perform when a gesture occurs. The gesture recognizer can then track the original event and identify gestures based on system-defined heuristics. Before you introduce a gesture recognizer, if you want to recognize a gesture, you need to track the original touch event flow of the view, and then use a sophisticated heuristic to determine whether these events represent a gesture.

The Uikit framework now contains a UIGestureRecognizer class that defines the basic behavior of all gesture recognizers. You can use a custom gesture recognizer subclass or a system-defined subclass to handle these standard gestures:

    • Spanking (any number of slaps)

    • Pinch inward or outward (for zooming)

    • Shaking or dragging

    • Rub (in any direction)

    • Rotate (move the finger in the opposite direction)

    • Long Press

For more information about the gesture recognizer you can use

File sharing support

Applications can use file shares to allow users to access programs ' user data files. File sharing allows applications to expose /Documents the content of the application catalog to users through itunes. This allows users to move files back and forth on ipad and desktop computers. However, this feature does not allow applications to share files with other applications on the same device. If you want to share files between programs, use the Clipboard or the document interaction controller object.

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

    1. Add a key to the application's Info.plist file UIFileSharingEnabled and set the key value to YES .

    2. Place the files you want to share in the application's Documents directory.

    3. Once the device is plugged into the user's computer, ITunes 9.1 displays a file sharing area in the Apps tab of the selected device.

    4. The user can then add files to the directory or move the files to the desktop computer.

If the application supports file sharing, the Documents application should be able to recognize and respond appropriately when the file is added to the directory. For example, an application can display the contents of a new file on the interface. Do not present a list of directories to the user and ask them what they want to do with the file.

Point-to-point services

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

Standard system View Controller

Many frameworks in the Cocoa touch layer contain a view controller that represents the standard system interface. We encourage you to use these view controllers in your applications, which allows you to have a consistent user experience for your programs and systems. If you need to perform the following tasks, select a view controller to use from the appropriate 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 contents of a file -please use the class in the Uikit framework UIDocumentInteractionController .

    • pick a photo from the user's photo gallery -Use the classes in the Uikit framework UIImagePickerController .

    • capturing video clips -use the classes in the Uikit framework UIImagePickerController .

To learn how to choose to use a view controller, see the iOS View Controller Programming Guide . For an understanding of the interface shown by a particular view controller, see the appropriate frame reference.

External Device Support

Devices that install iOS 3.2 can connect an external display device through a set of supported cables. When an external device is connected, the application can use its display to display the content. The information on the screen, including the resolution that the screen can support, can be obtained through the interface of the Uikit framework. You can also associate an application window to a screen through the framework.

    • UIScreenClass is used to get screen objects for all current screens, including the device home screen. Screen objects contain information about the properties of the screen, including screen features that take into account the size of the screen and the pixel scale.

    • You can UIScreenMode get information from a class on a screen with a specific size pixel scale.

    • You can assign a window (using UIWindow a Class) to a specific screen. If you need to mirror the content, you need to provide two separate windows and then display the same content in it.

For further information on the support provided by the above classes, see the corresponding class descriptions in the Uikit Framework reference .

Cocoa Touch layer contains the framework of the Address Book UI Framework event Kit UI Framework Game Kit framework IAD framework Map kit framework

IOS 3.0 Imports the map Kit Framework ( MapKit.framework ), which is an interface that can be embedded in the application, which contains a map view that can be scrolled. You can add custom information to the view and embed it in the application view to programmatically set the various properties of the map, including the area displayed by the current map and the user's orientation. You can also highlight certain areas of the map or additional information using custom or standard annotations, such as using stylus markers.

In an iOS 4.0 system, the framework begins to support draggable labels and custom overlays. A draggable callout allows you to reposition a callout programmatically or by user interaction. Overlays can be used to create complex map callouts consisting of multiple points. Map surfaces such as bus routes, election maps, park boundaries, or meteorological information (such as radar data) can be displayed using overlays.

To learn more about the classes in the Map kit framework, see the Map Kit Framework Reference .

Message UI Framework uikit Framework Media layer Graphics technology

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. In some cases, however, you may need some functionality that Uikit does not have, and you need to customize some behavior. In this case, you can use the following techniques to manage the graphical content of your application:

    • Core Graphics (also known as quartz) for handling local 2D vector rendering and picture rendering.

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

    • OpenGL ES, which provides support for 2D and 3D rendering using hardware-accelerated interfaces.

    • Core text, providing a sophisticated layout and rendering engine.

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

    • The Asset Library framework (Assets Library framework), which can be used to access photos and videos in the user photo gallery.

Most applications should not need to be changed, or can be run on devices with high-resolution screens with minimal modifications. Because when you draw or manipulate the view, the coordinates you specify are mapped to the logical coordinate system, which is not associated with the underlying screen resolution. And the drawn content is automatically scaled as needed to support high-resolution screens. For code that is based on vectors, the system framework automatically uses extra pixels to improve the content of the drawing and make it clearer. If you use a picture in your application, you can use Uikit to automatically load the high-resolution version of an existing picture.

Audio technology

Keep in mind that you want to choose the high-level framework as much as possible, because they simplify the work required to play audio. The frameworks listed below are arranged from high to low, and the Media Player Framework (Framwork) provides the most advanced interfaces:

    • Media Player framework. The framework makes it easy to access the user's Itume library and supports playing tracks and playlists.

    • AV Foundation Framework. It provides a set of easy-to-use OBJECTIVE-C interfaces that you can use to manage the playback or recording of audio.

    • OpenAL frame. It provides a set of interfaces for distributing azimuth audio across platforms.

    • Core Audio Framework. It provides an interface that is simple and precise and can be used to play or record audio content. You can use these interfaces to play the system's alarm sounds, to trigger a vibration function, to manage multi-channel buffering and playback, and to stream audio content.

Video

When selecting video technology, choose the high-level framework as much as possible, because the advanced framework simplifies the work required to provide support for a feature. The frameworks listed below are arranged from advanced to low level. Among them, the Media Player framework provides the highest level of interface:

    • The media Player framework, which provides a set of easy-to-use interfaces that can be used to play a full-screen or partial-screen movie in an application.

    • AV Foundation Framework, which provides a set of OBJECTIVE-C interfaces that can be used to manage the capture and playback of movies.

    • Core Media Framework, which describes the underlying types used by higher-level frameworks, and also provides some underlying interfaces that are used to process media.

Core Services Layer

The Core services layer provides the underlying system services for all applications. It is possible that applications do not use these services directly, but they are the basis on which many parts of the system are constructed.

The following sections describe some of the more common features, and perhaps you are planning to have your application support these features.

Block Object Grand Central Dispatch in-app purchase (in app Purchase) Location Services Sqlitexml Support

Core Foundation Framework

Core Foundation Framework ( CoreFoundation.framework ) is a set of C-language interfaces that provide basic data management and service functionality for iOS applications. The following lists the data that the framework supports for management and what services are available:

    • Group data types (arrays, collections, etc.)

    • Package

    • String Management

    • Date and time management

    • RAW Data Block Management

    • Preference Management

    • URL and Data flow operations

    • Threading and Runloop

    • Port and Soket Communication

The Core Foundation framework is closely related to the foundation framework, which provides interfaces for the same functionality, but the foundation framework provides the OBJECTIVE-C interface. If you use the foundation object with the core foundation type, you can take advantage of the "toll-free bridging" between the two frameworks. The so-called toll-free bridging is that you can use some of the types in the core Foundatio and foundation frameworks at the same time in a framework's methods or functions. Many data types support this feature, including group and string data types. The class and type descriptions for each frame are toll-free bridged for an object and what object bridging should be described.

Foundation Framework

Foundation Framework ( Foundation.framework ) provides objective-c encapsulation for many of the features of the Core Foundation framework. You can refer to the Core Foundation framework for the previous description of the core Foundation framework. The Foundation framework provides support for the following features:

    • Group data types (arrays, collections, etc.)

    • Package

    • String Management

    • Date and time management

    • RAW Data Block Management

    • Preference Management

    • URL and Data flow operations

    • Threading and Runloop

    • Bonjour

    • Communication port Management

    • Internationalization

    • Regular expression Matching

    • Cache support

Core OS Layer Accelerate framework external accessory framework Security framework System

Frames in IOS frame devices

Table B-1 describes the frameworks provided by IOS devices, which are located in the <Xcode> /Platforms/iPhoneOS.platform/Developer/SDKs/ <iOS_SDK> /System/Library/Frameworks directory. The <Xcode> in the path represents the installation directory of Xcode, and <iOS_SDK> indicates the target SDK version.

The framework of the simulator

The frame of the device and simulator is slightly different. The emulator takes several Mac OS x frameworks as part of its own implementation. In addition, due to system limitations, the exact interface of the device framework may be slightly different from the simulator framework.

System Library

Note that the iOS system may not package some special libraries for the core OS and core services layer into a framework, but instead place them as dynamic libraries in the system's /usr/lib directory. The dynamic shared library .dylib is identified by an extension and its corresponding header file is located in the /usr/include directory.

All versions of the iphone SDK include a local copy of the dynamic shared library that is installed on the system. These copies are installed on your development system and you can link from the Xcode project. If you need to see a version of the dynamic library list, see <Xcode> /Platforms/iPhoneOS.platform/Developer/SDKs/ <iOS_SDK> /usr/lib . In this path,<Xcode> represents the installation directory for Xcode,<iOS_SDK> indicates that you were using a version of the SDK at that time.

iOS uses symbolic links to point to the most recent version of the library. When linking a dynamic shared library, use a symbolic link instead of a dynamic library-specific version link. Because in future versions of iOS, the version of the library may change. If your software is connected to a specific version, and that version may no longer exist in the user's system, there will be a problem.

What does the IPhone SDK contain?

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.