The Foundation framework is the Foundation layer for accessing basic data types, collections, and operating system services to define application functionality. The Foundation framework provides basic functionality for applications and frameworks, including data storage and persistence, text processing, date and time computing, sorting and filtering, and networking. The classes, protocols, and data types defined by Foundation are used throughout the MacOS, iOS, watchOS, and tvOS SDKs.

First, the basic content

1, Numbers, Data, and Basic Values

Raw values and other basic data types used in Cocoa.

2, Strings and Text

Creates and processes strings of Unicode characters, uses regular expressions to find patterns, and performs natural language analysis on the text.

3, the Collections

Use arrays, dictionaries, collections, and specialized collections to store and iterate over groups of objects or values.

4. Dates and Times

Compare dates and times, and perform calendar and time zone calculations.

5, Units and Measurement

Numeral quantities are marked with physical dimensions to allow conversion between locale formats and related units.

6, Data Formatting

Converts numbers, dates, measures, and other values into a local-aware string representation.

7, Filters and Sorting

Use predicates, expressions, and sorting descriptors to examine elements in collections and other services.

Second, application support

1, Task Management

Manage the work of the application and how the application interacts with system services such as Handoff and Shortcuts.

2, the Resources,

Access the assets and other data that are tied to your application.

3, the Notifications

Design patterns for broadcast messages and subscription broadcasts.

4, App Extension Support

Manage the interaction between application extensions and their hosted applications.

5. Errors and Exceptions

Respond to problem situations when interacting with APIs and fine-tune your application for better debugging.

6, Scripting Support

Allows users to control your application using AppleScript and other automation technologies, or to run scripts from within your application.

File and data persistence

1, the File System

Create, read, write, and examine files and folders on the file system.

2. Archives and Serialization

Convert objects and values back and forth between property lists, JSON, and other flat binary representations.

3, the Preferences

Perpetually store domain-wide information to configure your application.

4, Spotlight

Search for files and other items on your local device and index the content of your application to do the search.

5, ripped

Manages file and key-value data that is automatically synchronized between a user's iCloud devices.

6. Optimizing App Data for iCloud Backup

Minimize the amount of space and time required by iCloud Backup for your application data.

Four, network

1. URL Loading System

Use standard Internet protocols to interact with URLs and communicate with servers.

2, Bonjour

Broadcast services to facilitate discovery on the local network, or to discover services broadcast by others.

Five, the underlying utility

1, the XPC

Manage secure interprocess communication.

2, the Object, the Runtime

Get low-level support for basic Objective-C features, Cocoa design patterns, and Swift integration.

3, Processes and Threads

Manage your application's interactions with the host operating system and other processes and implement low-level concurrency capabilities.

4, Streams, Sockets, and Ports

Use the underlying UNIX functionality to manage the input and output between files, processes, and the network.

Sixth, other

Foundation Enumerations