App and Environment

Learn about the objects that you use to interact with the system.

Topics

Life Cycle

class NSApplication

An object that manages an app’s main event loop and resources used by all of that app’s objects.

class NSRunningApplication

An object that can manipulate and provide information for a single instance of an app.

protocol NSApplicationDelegate

A set of methods that delegates of NSApplication objects can implement.

Environment

class NSWorkspace

A workspace that can launch other apps and perform a variety of file-handling services.

class NSWorkspace.OpenConfiguration

The configuration options to use when opening URLs or launching apps.

struct NSAppKitVersion

Constants for determining which version of AppKit is available.

Handoff

class NSUserActivity

A representation of the state of your app at a moment in time.

App Services

class NSSharingService

A service that lets users share content with other services, such as social media services, or apps, such as Mail and Safari.

class NSSharingServicePicker

A list of sharing services from which the user can choose.

protocol NSSharingServicePickerDelegate

A set of methods that you use to customize the service picker behavior.

protocol NSServicesMenuRequestor

A set of methods that support interaction with items users can share through a sharing service.

protocol NSCloudSharingServiceDelegate

A protocol that an iCloud-sharing service implements to handle status changes and errors.

App Help

class NSHelpManager

An object for displaying online help for an app.

protocol NSUserInterfaceItemSearching

A set of methods an app can implement to provide Spotlight for Help for its own custom help data.

Errors

AppKit Errors

These constants represent errors generated by NSAttributedString.

See Also

App Structure

Documents, Data, and Pasteboard

Organize your app's data and preferences, and share that data on the pasteboard or in iCloud.

Cocoa Bindings

Automatically synchronize your data model with your app's interface using Cocoa Bindings.

Resource Management

Manage the storyboards and nib files containing your app's user interface, and learn how to load data that is stored in resource files.

App Extensions

Extend your app's basic functionality to other parts of the system.