[IOS/translation] Core Services Layer

Source: Internet
Author: User

[IOS/translation] Core Services Layer

This core service layer includes basic system services of applications. The key services are between core functions and core function libraries. All applications must use these basic types. This layer also contains individual technologies such as local, iCloud, public media, and networks.

Advanced features

The following section describes some advanced features at the core service layer.

Peer-to-Peer Services)
The multi-point Connection Library provides point-to-point connections over Bluetooth. You can initialize a point-to-point connection to interact with a nearby device. Although point-to-point connections are mainly used in games, you can use this feature in other types of applications.

Cloud storage (ICloud Design Guide)
The iCloud storage allows applications to write user documents and data to the local center. Users can access these resources from their computers or IOS devices. So that your documents are stored in ICloud, you can use other devices to modify or view their documents without synchronization, and explicitly transfer files. Securely store documents under your iCloud account. Even if the user loses the device, the document is still stored in the iCloud storage.
Applications can use these two cloud storage features.

ICloud document storage
You can store documents and data under your iCloud account.
You can use the interfaces between applications to share small data with CloudKit storage.
When you want to create public shared content or manage your own data transmission

Many applications share documents using their iCloud accounts. Users are concerned about when documents are shared through devices, or they can view and manage these shared documents. On the contrary, the data users of iCloud key-value are invisible, but this is a way to share this small data (10 k) through the application interface ). Applications should use this feature to store non-critical application data, such as preferences configuration, rather than important application data.

Object Block (Blocks Programming Topics )(Guide)
Block Objects is based on the C language structure and can be used in the C language code and OBJ-C language code. A Block object is essentially a function without a name and data obtained through this method, some in other applications are called closure or lambda. Blocks has a unique usage, such as callbacks or in a place you need a simple method to combine the running Code and related data.
In IOS, blocks is usually used in

It is similar to replacing the Delegate and Delegate methods. It is similar to replacing the callback function to execute a one-time operation to complete the processing program, which is easy to use together with dispatch queues to execute asynchronous tasks.

App Programming Guide for iOS)
Data Protection allows applications to use more advantageous user data with built-in encryption in some devices. When your application specifies a special file to be protected, the system uses encryption to store the file on the hard disk. When the device is locked, your application or even hackers cannot access this file. However, when the user unlocks the device, the application can access the file by using the created decryption file. You can use different levels of data protection.
To implement data protection, you need to consider how to create and manage the files you want to protect. The application must be designed to protect the data during creation and access files when the user locks and unlocks the device.

Support file sharing
File sharing allows applications to obtain user data in iTunes9.1 or a later version. An application must declare that it supports file sharing and share content in the/Documents dictionary. Users can move files shared to iTunes into or out of this dictionary. This feature does not allow applications to share files with other applications on the same device. This feature requires pasteboard and a document management object.
Allow sharing files to your application

Add UIFileSharingEnabled Key to your application Info. in plist, set this value to YES and put the file you want to share under Documents of the application. when the device is connected to the computer, iTunes will display the file shared to the performance of the selected device. You can add files to the dictionary or move the files to the desktop.

Applications Support file sharing and should be able to manage them. When the file is added to Documents, and make the corresponding response. For example, some of your applications appear to be added here through interfaces. You should not present the file list in this directory to users, but tell them how to use these files.

GCD (Guide)
GCD is a BSD-level technology that allows you to manage executed tasks in applications. GCD, in combination with the asynchronous compilation mode, is a very convenient and efficient mode for advanced languages of different threads. GCD also provides many convenient methods for low-level tasks, such as reading and writing file descriptions, implementing timers, monitoring signals, and processing events.

In-app Purchanse
In-App Purchase provides the content, services, and iTunes content specified In the App for sale to your App. The StoreKit library can be used to implement these features. The Library provides an iTunes account for transaction processing. Applications control the entire user experience and visualized payment presentation content or services. For downloadable content, you can host your own content or let the apple service help you carry it.

SQLite
The SQLite database provides an efficient embedded database for applications. You do not need to use an external database service. For applications, you can create local databases and manage or record files. This library is designed for general users and has efficient access and processing capabilities.
The header file for accessing the SQLite library is in/usr/include/sqlite3.h and in the Xcode installation path.

Supports XML documentation for libxml2
This function library provides the NSXMLParser class to process content from XML documents. In addition, XML data in the libxml2 library can be operated. This is an open-source library that allows you to quickly parse or compile XML data or convert XML content to HTML.
The header file of the libxml2 library is under/usr/include/libxml2/and under the Xcode installation path.

Core Services Framework

Next we will introduce the functions of this Library and the Library.

List 5.0 system users Accounts. framework(AC) 2.0 address book AddressBook. framework(AB) 6.0 Advertisement AdSupport. framework() 2.0 network processing_ CFNetwork. framework
_( Guide) (CF) 8.0 Cloud Processing_ CloudKit. framework
_ (CK) 3.0 Core Data_ CoreData. framework
_ (NS) 2.0 core functions_ CoreFoundation. framework
_ (NS) 2.0 core location_ CoreLocation. framework
_( Guide) (CL) 4.0 core media_ CoreMedia. framework
_ (CM) 4.2 Core gestures_ CoreMotion. framework
_ (CM) 4.2 Core phone number_ CoreTelephony. framework
_ (CT) 4.0 calendar events_ EventKit. framework
_ (EK) 2.0 features_ Foundation. framework
_ (NS) 8.0 health care HealthKit. framework(HK) 7.0 JaveScript JavaScriptCore. framework(JS) 3.0 Core mobile phone services MobileCoreServices. framework(UT) 7.0 multi-point connection Multipeer Connectivity Framework(MC) 5.0 news NewsstandKit. framework( Guide) (NK) 6.0 Passes PassKit. framework( Guide) (PK) 4.0 quick preview QuickLook. framework(QL) 7.0 Safari Service SafariServices. framework(SS) 6.0 Society Social. framework(SL) 3.0 payment StoreKit. framework( Guide) (SK) 2.0 System Configuration SystemConfiguration. framework(SC) 8.0 Network WebKit. framework(WK)

5.0 system users Accounts. framework
Provides a single logon mode. This mode avoids multi-account logon and optimizes the logon experience. You can use this database to log on and modify user data. At the same time, it simplifies the authorization issues during management for your applications. This library can be used together with the Social framework. (AC)

2.0 address book AddressBook. framework
Directly go to the user's address book. If your application needs Address Book information, you can use this library to enter and modify address book information. For example, you need to find the information that has recently been added to the address book and display the information. (AB)

6.0 Advertisement AdSupport. framework
Provides access to identifiers for advertising purposes. This framework also provides a flag to determine whether a user selects ad tracking. Before using an identifier to access an application, the application must be readable and loyal to advertising tracking. ()

2.0 network processing_ CFNetwork. framework
_(Guide)
A network library based on C language, object-oriented, and efficient processing. This library provides many details for processing network Component Heap and makes it easier to use underlying modules, such as BSD socket. It also simplifies FTP and HTTP Services, or solves DNS host. (CF)

When using BSD sockets to use SLL or TLS, create an encrypted link to solve the problem of DNS hosts serving as the HTTP service, verifying the HTTP service, HTTPS service, etc. Work for FTP service release, process and browse Bonjour service, etc ( Guide)

8.0 Cloud Processing_ CloudKit. framework
_
Provides a channel to transfer data from your application to ICloud. Unlike other iCloud technologies, this transmission is more direct. This database gives you the ability to control data changes. You can also use it to manage all types of data.
The app can directly share store data to all users. This public library is bound to an app even if you have not registered an iCloud account. Application developers can directly manage data here and learn any behavior of users to modify data. (CK)

3.0 Core Data_ CoreData. framework
_
Is a Model-View-Controller application that manages data models. This library intentionally makes the data model used by the application the highest standard. Instead of defining the data structure, use a graphical tool in xcode to build a mode to represent the data mode. When an application is running, the data mode of the instance is created, managed, and visualized through this database. (NS)

Object data is stored in a high-performance SQLite database. An NSFetchedResultsController class manages tableView results. Redo/restore is supported. On the basis of the basic text modification capability, attribute value verification is supported. inheritance is supported to ensure that the relationships between classes continue. consistent support for the formation of groups in the memory, data Filtering and organization data capabilities
If you want to develop a new application or plan to upgrade an existing application. You should consider using this library. For example, to use this library in an IOS app, please refer Core Data Tutorial for iOS

2.0 core functions_ CoreFoundation. framework
_
Some columns are based on the C language interface, providing the most basic data processing and IOS service features. (CF)

Collection data types (arrays, groups, and others) Bundles String management Time Date and Time management raw data fast management network connections, Network Flow Management multithreading, cyclic operation Port and socket connections
This library has a great relationship with the Foundation library and provides the same basic features as the OBJ-c-based interface. When you need a mixed class function or type, you can use the "toll-free bridging" existing in two different classes ", this "toll-free bridging" refers to the use of this Library and the Library type exchange and any library in some methods. This is applicable to many data types, including set and string data types. The class and type descriptions for each framework state whether an object is toll-free bridged and, if so, what object it is connected.

2.0 core location_ CoreLocation. framework
_(Guide)
This Library provides the application with location and title information. For location information, this library uses GPS, cell, or Wi-Fi remote control to find the user's actual dimensions and accuracy. You can use this technology in applications to provide coordinates for users. For example, you may have a business that wants to obtain a restaurant, shop, or factory near a user, or the correct location of the user. (CL)

The IOS device with a gyroscope can access the compass information on the map or obtain the monitoring region information in the Bluetooth information. Use the low-energy local search and Mapkit together, in a specific situation, the coordinate quality can be improved, for example, navigation.

4.0 core media_ CoreMedia. framework
_
Provides underlying image types for the AVFoundation library. Many applications need to use this library, but it is only used by a few developers to precisely create or display audio and video content. (CM)

4.2 Core gestures_ CoreMotion. framework
_
Provides a set of gesture-based interfaces for devices. The Library supports accessing raw and processed accelerator data using a new block-based interface. Devices with their own gyroscope can detect original gyroscope data and games based on gyroscope data, other apps that use gestures, or use a method to improve user experience. Hardware devices with built-in motion statistics allow you to access the data and use the data for health care activities. (CM)

4.2 Core phone number_ CoreTelephony. framework
_
Provides an interface based on mobile phone information for devices with the call function. The application can use this library to obtain the telephone services of users. Suitable for call applications, such as VoIP (VoIP) applications, and can receive all notifications from the phone. (CT)

4.0 calendar events_ EventKit. framework
_
Contains the most common audio and video that can be operated. Do not directly use this framework. Provides an interface to access the calendar on your device. (EK)

Get an existing event, and get an event reminder from the user's calendar. Add an event to the user's calendar. You can create a reminder event, in addition, it is displayed on the application of the reminder event + the alarm clock for configuring the calendar event, including the content of this alarm.
Important: Ask the user's calendar and prompt that the data can be used only with the user's consent. The application must process user access prohibited. Applications are also encouraged to provide the Keys description on Info. plist and the access request requirements.

2.0 features_ Foundation. framework
_
In the Core Foundation library, this library provides many features based on the OBJ-c base class. You can find the description in the Core Foundation library. (NS)

Collection data types (arrays, groups, and others) Bundles String management Time Date and Time management raw data fast management network connection, Network Flow Management multithreading, cache Mechanism of Regular Expression matching between circular operation Port and socket Connection Network

8.0 health care HealthKit. framework
A brand new database for managing user and health-related information. In a diffusion-type application, it is difficult for users to find out how they do health devices and health information. However, this library allows the app to share health care information from IOS devices or manually entered by users. User health information is stored in a secure and centralized location. Users can view all their health care information on the health care application.
When your application supports this database, you can access user-related health information to obtain user information without tracking the health care devices. Information sharing is determined by users. When your application can obtain the data, you can register a notification to obtain information changes and obtain the information time, which can be fine-tuned. For example, you can request the user's blood pressure in the app and set a notification about the blood pressure. (HK)

7.0 JaveScript JavaScriptCore. framework
Provides many JaveScript standard classes packaged Based on OBJ-c. You can use this library to test JaveScript code and parse Json data. (JS)

3.0 Core mobile phone services MobileCoreServices. framework
Defines the underlying type, applicable to UTIs standard definition (UT)

7.0 multi-point connection MultipeerConnectivity. framework
Devices that search for attachments and directly interact with devices that are not connected through the network. This database allows you to easily create multi-point sessions and supports reliable ordered data transmission and real-time transmission. In this database, you can interact with nearby devices and seamlessly exchange data.
This library provides services for scanning and managing networks. Applications can integrate MCBrowserViewController to display devices in a list on the page for users to select. Alternatively, you can use the MCNearbyServiceBrowser class to view and manage devices. (MC)

5.0 news NewsstandKit. framework(Guide)
Provides a center for reading magazines and news. Publishers can use this library to create application development magazines and publish news to Newsstand. Newsstand supports background download. After you start downloading, the system controls the download operation and notifies the user after the download is completed. (NK)

6.0 Passes PassKit. framework(Guide)
The Passbook application provides users with a place to buy discount coupons, plane tickets, other tickets, and commercial discount cards. Replace the previous offline purchase method. Users can now purchase them on IOS devices and use them the same as before. This Library provides the OBJ-c interface to integrate items into your application. You can use this application to combine network interfaces and file formats to create and manage your company's Offers.
Use your company's servers to create Passes and pay for your devices (via email, safairi, and applications. This Pass is a special file format and is encrypted before payment. The ID of this file grid is related to services so that users can know what these services are doing. It can also have a bar code or other information so that you can use it for verification, return, and use. (PK)

4.0 quick preview QuickLook. framework
In the application, a direct interface is provided to preview the file content. This library is used to download files from the network and the working files at the source. After obtaining the file, you can use the viewcontroller provided by the Library to directly display the file content. (QL)

7.0 Safari Service SafariServices. framework
Add URLs to the user's Safari reading list for the program. (SS)

6.0 Society Social. framework
Provides a simple interface to access a user's social media account. This library replaces the Twitter library and adds support for other social accounts, including facebook, Sina Weibo, and others. The application uses this library to modify the status and account avatar. This library works with the Account library to provide users with a simple login mode and confirm that they have passed the user Account authentication. (SL)

3.0 payment StoreKit. framework(Guide)
Supports payment content and services for IOS apps, such as In-app Purchase. For example, you can use this feature to allow users to unlock additional content in the application. Or if you are a game developer, you can use it to provide additional game levels. Same. This database manages transactions and processes payment requests and obtains information about the purchase content through the user and the account of the itunes store. (SK)

2.0 System Configuration SystemConfiguration. framework
Provides a accessibility interface that you can use to determine the network settings of a device. You can use this library to determine whether a particular server can be accessed in Wi-Fi settings or in a cellular network. (SC)

8.0 Network WebKit. framework
([Core Services Layer] [2])
Display HTML content for applications. In addition to HTML display, You can provide basic modifications to replace text, modify document content and attributes, including CSS. WebKit also supports creating and modifying content under DOM-level HTML documents. For example, you can use a page of summary link list to modify them and replace their displayed priority in a network interface. (WK)

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.