<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/app-and-environment",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "App and Environment"
}
-->

# App and Environment

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

## Topics

### Life Cycle

[`NSApplication`](/documentation/AppKit/NSApplication)

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

[`NSRunningApplication`](/documentation/AppKit/NSRunningApplication)

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

[`NSApplicationDelegate`](/documentation/AppKit/NSApplicationDelegate)

A set of methods that manage your app’s life cycle and its interaction with common system services.

[`NSApplicationMain`](/documentation/AppKit/NSApplicationMain)

Called by the main function to create and run the application.

[`NSApplicationMain(_:_:)`](/documentation/AppKit/NSApplicationMain(_:_:))

Called by the main function to create and run the application.

[Managing ongoing background processes in your Mac](/documentation/AppKit/managing-ongoing-background-processes-in-your-mac)

Configure your app to help people understand when background processes may continue after they close your app.

### Environment

[`NSWorkspace`](/documentation/AppKit/NSWorkspace)

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

[`OpenConfiguration`](/documentation/AppKit/NSWorkspace/OpenConfiguration)

The configuration options for opening URLs or launching apps.

[`NSAppKitVersion`](/documentation/AppKit/NSAppKitVersion)

Constants for determining which version of AppKit is available.

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/LSMinimumSystemVersion>

### Handoff

  <doc://com.apple.documentation/documentation/Foundation/NSUserActivity>

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

A protocol that marks classes to restore the state of your app to continue a user activity.

### App Services

[`NSSharingService`](/documentation/AppKit/NSSharingService)

An object that facilitates the sharing of content with social media services, or with apps like Mail or Safari.

[`NSSharingServicePicker`](/documentation/AppKit/NSSharingServicePicker)

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

[`NSPreviewRepresentableActivityItem`](/documentation/AppKit/NSPreviewRepresentableActivityItem)

An interface you adopt in custom objects that you want to share using the macOS share sheet.

[`NSSharingServicePickerToolbarItem`](/documentation/AppKit/NSSharingServicePickerToolbarItem)

A toolbar item that displays the macOS share sheet.

[`NSServicesMenuRequestor`](/documentation/AppKit/NSServicesMenuRequestor)

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

[`NSCloudSharingServiceDelegate`](/documentation/AppKit/NSCloudSharingServiceDelegate)

A set of methods for responding to the life cycle events of the cloud-sharing service.

[Services Functions](/documentation/AppKit/services-functions)

Configure the contents of your app’s Services menu.

### App Help

[`NSHelpManager`](/documentation/AppKit/NSHelpManager)

An object for displaying online help for an app.

[`NSUserInterfaceItemSearching`](/documentation/AppKit/NSUserInterfaceItemSearching)

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

### Errors

[AppKit Errors](/documentation/AppKit/appkit-errors)

These constants represent errors generated by AppKit.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)