<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplication",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIApplication"
  },
  "title" : "UIApplication"
}
-->

# UIApplication

The centralized point of control and coordination for apps running in iOS.

```
@MainActor class UIApplication
```

## Overview

Every iOS app has exactly one instance of [`UIApplication`](/documentation/UIKit/UIApplication) (or, very rarely, a subclass of [`UIApplication`](/documentation/UIKit/UIApplication)). When an app launches, the system calls the [`UIApplicationMain(_:_:_:_:)`](/documentation/UIKit/UIApplicationMain(_:_:_:_:)-1yub7) function. Among its other tasks, this function creates a singleton [`UIApplication`](/documentation/UIKit/UIApplication) object that you access using [`shared`](/documentation/UIKit/UIApplication/shared).

Your app’s application object handles the initial routing of incoming user events. It dispatches action messages forwarded to it by control objects (instances of the [`UIControl`](/documentation/UIKit/UIControl) class) to appropriate target objects. The application object maintains a list of open windows ([`UIWindow`](/documentation/UIKit/UIWindow) objects), which it can use to retrieve any of the app’s [`UIView`](/documentation/UIKit/UIView) objects.

The [`UIApplication`](/documentation/UIKit/UIApplication) class defines a delegate that conforms to the [`UIApplicationDelegate`](/documentation/UIKit/UIApplicationDelegate) protocol and must implement some of the protocol’s methods. The application object informs the delegate of significant runtime events—for example, app launch, low-memory warnings, and app termination—giving it an opportunity to respond appropriately.

Apps can cooperatively handle a resource, such as an email or an image file, through the [`open(_:options:completionHandler:)`](/documentation/UIKit/UIApplication/open(_:options:completionHandler:)) method. For example, an app that calls this method with an email URL causes the Mail app to launch and display the message.

The APIs in this class allow you to manage device-specific behavior. Use your [`UIApplication`](/documentation/UIKit/UIApplication) object to do the following:

- Temporarily suspend incoming touch events ([`beginIgnoringInteractionEvents()`](/documentation/UIKit/UIApplication/beginIgnoringInteractionEvents()))
- Register for remote notifications ([`registerForRemoteNotifications()`](/documentation/UIKit/UIApplication/registerForRemoteNotifications()))
- Trigger the undo-redo UI ([`applicationSupportsShakeToEdit`](/documentation/UIKit/UIApplication/applicationSupportsShakeToEdit))
- Determine whether there is an installed app registered to handle a URL scheme ([`canOpenURL(_:)`](/documentation/UIKit/UIApplication/canOpenURL(_:)))
- Extend the execution of the app so that it can finish a task in the background ([`beginBackgroundTask(expirationHandler:)`](/documentation/UIKit/UIApplication/beginBackgroundTask(expirationHandler:)) and [`beginBackgroundTask(withName:expirationHandler:)`](/documentation/UIKit/UIApplication/beginBackgroundTask(withName:expirationHandler:)))
- Schedule and cancel local notifications ([`scheduleLocalNotification(_:)`](/documentation/UIKit/UIApplication/scheduleLocalNotification(_:)) and [`cancelLocalNotification(_:)`](/documentation/UIKit/UIApplication/cancelLocalNotification(_:)))
- Coordinate the reception of remote-control events ([`beginReceivingRemoteControlEvents()`](/documentation/UIKit/UIApplication/beginReceivingRemoteControlEvents()) and [`endReceivingRemoteControlEvents()`](/documentation/UIKit/UIApplication/endReceivingRemoteControlEvents()))
- Perform app-level state restoration tasks (methods in the [`Managing state restoration`](/documentation/UIKit/UIApplication#Managing-state-restoration) task group)

### Subclassing notes

Most apps don’t need to subclass [`UIApplication`](/documentation/UIKit/UIApplication). Instead, use an app delegate to manage interactions between the system and the app.

If your app must handle incoming events before the system does—a very rare situation—you can implement a custom event or action dispatching mechanism. To do this, subclass [`UIApplication`](/documentation/UIKit/UIApplication) and override the [`sendEvent(_:)`](/documentation/UIKit/UIApplication/sendEvent(_:)) and/or the [`sendAction(_:to:from:for:)`](/documentation/UIKit/UIApplication/sendAction(_:to:from:for:)) methods. For every event you intercept, after you handle the event, dispatch it back to the system by calling:

```swift
super.sendEvent(event)
```

Intercepting events is only rarely required and you should avoid it if possible.

## Topics

### Accessing the shared application

[`shared`](/documentation/UIKit/UIApplication/shared)

The singleton app instance.

### Configuring your app’s behavior

[`delegate`](/documentation/UIKit/UIApplication/delegate)

The delegate of the app object.

[`UIApplicationDelegate`](/documentation/UIKit/UIApplicationDelegate)

A set of methods to manage shared behaviors for your app.

### Registering for remote notifications

[`registerForRemoteNotifications()`](/documentation/UIKit/UIApplication/registerForRemoteNotifications())

Registers to receive remote notifications through Apple Push Notification service.

[`unregisterForRemoteNotifications()`](/documentation/UIKit/UIApplication/unregisterForRemoteNotifications())

Unregisters for all remote notifications received through Apple Push Notification service.

[`isRegisteredForRemoteNotifications`](/documentation/UIKit/UIApplication/isRegisteredForRemoteNotifications)

A Boolean value that indicates whether the app is currently registered for remote notifications.

### Getting the application state

[`applicationState`](/documentation/UIKit/UIApplication/applicationState)

The app’s current state, or that of its most active scene.

[`UIApplication.State`](/documentation/UIKit/UIApplication/State)

Constants that indicate the running states of an app.

### Getting scene information

[`supportsMultipleScenes`](/documentation/UIKit/UIApplication/supportsMultipleScenes)

A Boolean value that indicates whether the app may display multiple scenes simultaneously.

[`connectedScenes`](/documentation/UIKit/UIApplication/connectedScenes)

The app’s currently connected scenes.

[`openSessions`](/documentation/UIKit/UIApplication/openSessions)

The sessions whose scenes are either currently active or archived by the system.

### Managing a scene’s life cycle

[`activateSceneSession(for:errorHandler:)`](/documentation/UIKit/UIApplication/activateSceneSession(for:errorHandler:))

Asks the system to activate an existing scene or create a new scene and associate it with your app.

[`activateSceneSessionForRequest:errorHandler:`](/documentation/UIKit/UIApplication/activateSceneSessionForRequest:errorHandler:)

Asks the system to activate an existing scene or create a new scene and associate it with your app.

[`requestSceneSessionDestruction(_:options:errorHandler:)`](/documentation/UIKit/UIApplication/requestSceneSessionDestruction(_:options:errorHandler:))

Asks the system to dismiss an existing scene and remove it from the app switcher.

[`requestSceneSessionRefresh(_:)`](/documentation/UIKit/UIApplication/requestSceneSessionRefresh(_:))

Asks the system to update any system UI associated with the specified scene.

[`UISceneSessionActivationRequest`](/documentation/UIKit/UISceneSessionActivationRequest-swift.struct)

A collection of properties that you use to request activation of a scene.

[`UISceneSessionActivationRequest`](/documentation/UIKit/UISceneSessionActivationRequest-c.class)

A collection of properties that you use to request activation of a scene.

[`UIScene.ActivationRequestOptions`](/documentation/UIKit/UIScene/ActivationRequestOptions)

An object that contains information you want the system to use when activating the session associated with a scene.

[`UISceneDestructionRequestOptions`](/documentation/UIKit/UISceneDestructionRequestOptions)

An object you pass to UIKit to permanently remove a scene and its associated session from your app.

### Managing background tasks

[`backgroundRefreshStatus`](/documentation/UIKit/UIApplication/backgroundRefreshStatus)

Indicates whether the app can refresh content when running in the background.

[`UIBackgroundRefreshStatus`](/documentation/UIKit/UIBackgroundRefreshStatus)

Constants that indicate whether background execution is enabled for the app.

[`backgroundRefreshStatusDidChangeNotification`](/documentation/UIKit/UIApplication/backgroundRefreshStatusDidChangeNotification)

A notification that posts when the app’s status for downloading content in the background changes.

[`beginBackgroundTask(withName:expirationHandler:)`](/documentation/UIKit/UIApplication/beginBackgroundTask(withName:expirationHandler:))

Marks the start of a task with a custom name that should continue if the app enters the background.

[`beginBackgroundTask(expirationHandler:)`](/documentation/UIKit/UIApplication/beginBackgroundTask(expirationHandler:))

Marks the start of a task that should continue if the app enters the background.

[`endBackgroundTask(_:)`](/documentation/UIKit/UIApplication/endBackgroundTask(_:))

Marks the end of a specific long-running background task.

[`UIBackgroundTaskIdentifier`](/documentation/UIKit/UIBackgroundTaskIdentifier)

A unique token that identifies a request to run in the background.

[`backgroundTimeRemaining`](/documentation/UIKit/UIApplication/backgroundTimeRemaining)

The maximum amount of time remaining for the app to run in the background.

### Fetching content in the background

[`backgroundFetchIntervalMinimum`](/documentation/UIKit/UIApplication/backgroundFetchIntervalMinimum)

The smallest fetch interval supported by the system.

[`backgroundFetchIntervalNever`](/documentation/UIKit/UIApplication/backgroundFetchIntervalNever)

A fetch interval large enough to prevent fetch operations from occurring.

### Opening a URL resource

[`open(_:options:completionHandler:)`](/documentation/UIKit/UIApplication/open(_:options:completionHandler:))

Attempts to asynchronously open the resource at the specified URL.

[`canOpenURL(_:)`](/documentation/UIKit/UIApplication/canOpenURL(_:))

Returns a Boolean value that indicates whether an app is available to handle a URL scheme.

[`UIApplication.OpenExternalURLOptionsKey`](/documentation/UIKit/UIApplication/OpenExternalURLOptionsKey)

Options for opening a URL.

### Deep linking to custom settings

[`openSettingsURLString`](/documentation/UIKit/UIApplication/openSettingsURLString)

The URL string you use to deep link to your app’s custom settings in the Settings app.

[`openNotificationSettingsURLString`](/documentation/UIKit/UIApplication/openNotificationSettingsURLString)

The URL string you use to deep link to your app’s notification settings in the Settings app.

[`UIApplicationOpenNotificationSettingsURLString`](/documentation/UIKit/UIApplicationOpenNotificationSettingsURLString)

A constant that provides the URL string you use to deep link to your app’s notification settings in the Settings app.

[`openDefaultApplicationsSettingsURLString`](/documentation/UIKit/UIApplication/openDefaultApplicationsSettingsURLString)

The URL string used to select a default app in the Settings app.

### Managing the app’s idle timer

[`isIdleTimerDisabled`](/documentation/UIKit/UIApplication/isIdleTimerDisabled)

A Boolean value that controls whether the idle timer is disabled for the app.

### Managing state restoration

[`extendStateRestoration()`](/documentation/UIKit/UIApplication/extendStateRestoration())

Tells the app that your code is restoring state asynchronously.

[`completeStateRestoration()`](/documentation/UIKit/UIApplication/completeStateRestoration())

Tells the app that your code has finished any asynchronous state restoration.

[`ignoreSnapshotOnNextApplicationLaunch()`](/documentation/UIKit/UIApplication/ignoreSnapshotOnNextApplicationLaunch())

Prevents the app from using the recent snapshot image during the next launch cycle.

[`registerObject(forStateRestoration:restorationIdentifier:)`](/documentation/UIKit/UIApplication/registerObject(forStateRestoration:restorationIdentifier:))

Registers a custom object for use with the state restoration system.

### Providing an app’s shortcut items

[`shortcutItems`](/documentation/UIKit/UIApplication/shortcutItems)

The Home screen dynamic quick actions for your app; available on devices that support 3D Touch.

### Accessing protected content

[`isProtectedDataAvailable`](/documentation/UIKit/UIApplication/isProtectedDataAvailable)

A Boolean value that indicates whether content protection is active.

[`protectedDataDidBecomeAvailableNotification`](/documentation/UIKit/UIApplication/protectedDataDidBecomeAvailableNotification)

A notification that posts when the protected files become available for your code to access.

[`protectedDataWillBecomeUnavailableNotification`](/documentation/UIKit/UIApplication/protectedDataWillBecomeUnavailableNotification)

A notification that posts shortly before protected files are locked down and become inaccessible.

### Receiving remote control events

[`beginReceivingRemoteControlEvents()`](/documentation/UIKit/UIApplication/beginReceivingRemoteControlEvents())

Tells the app to begin receiving remote-control events.

[`endReceivingRemoteControlEvents()`](/documentation/UIKit/UIApplication/endReceivingRemoteControlEvents())

Tells the app to stop receiving remote-control events.

### Accessing the layout direction

[`userInterfaceLayoutDirection`](/documentation/UIKit/UIApplication/userInterfaceLayoutDirection)

The layout direction of the user interface.

[`UIUserInterfaceLayoutDirection`](/documentation/UIKit/UIUserInterfaceLayoutDirection)

Constants that specify the directional flow of the user interface.

### Controlling and handling events

[`sendEvent(_:)`](/documentation/UIKit/UIApplication/sendEvent(_:))

Dispatches an event to the appropriate responder objects in the app.

[`sendAction(_:to:from:for:)`](/documentation/UIKit/UIApplication/sendAction(_:to:from:for:))

Sends an action message identified by the selector to a specified target.

[`applicationSupportsShakeToEdit`](/documentation/UIKit/UIApplication/applicationSupportsShakeToEdit)

A Boolean value that determines whether shaking the device displays the undo-redo user interface.

### Managing the app’s icon

[`supportsAlternateIcons`](/documentation/UIKit/UIApplication/supportsAlternateIcons)

A Boolean value that indicates whether the app is allowed to change its icon.

[`alternateIconName`](/documentation/UIKit/UIApplication/alternateIconName)

The name of the icon the system displays for the app.

[`setAlternateIconName(_:completionHandler:)`](/documentation/UIKit/UIApplication/setAlternateIconName(_:completionHandler:))

Changes the icon the system displays for the app.

### Managing the preferred content size

[`preferredContentSizeCategory`](/documentation/UIKit/UIApplication/preferredContentSizeCategory)

The font sizing option preferred by the user.

[`UIContentSizeCategory`](/documentation/UIKit/UIContentSizeCategory)

Constants that indicate the preferred size of your content.

[`UIContentSizeCategoryAdjusting`](/documentation/UIKit/UIContentSizeCategoryAdjusting)

A collection of methods that give controls an easy way to adopt automatic adjustment to content category changes.

[`didChangeNotification`](/documentation/UIKit/UIContentSizeCategory/didChangeNotification)

A notification that posts when the user changes the preferred content size setting.

[`newValueUserInfoKey`](/documentation/UIKit/UIContentSizeCategory/newValueUserInfoKey)

A key that reflects the new preferred content size.

### Specifying the supported interface orientations

[`supportedInterfaceOrientations(for:)`](/documentation/UIKit/UIApplication/supportedInterfaceOrientations(for:))

Returns the default set of interface orientations to use for the view controllers in the specified window.

### Tracking controls in the run loop

[`UITrackingRunLoopMode`](/documentation/UIKit/UITrackingRunLoopMode)

The mode set while tracking in controls takes place.

### Tracking controls in the run loop

  <doc://com.apple.documentation/documentation/Foundation/RunLoop/Mode/tracking>

### Detecting screenshots

[`userDidTakeScreenshotNotification`](/documentation/UIKit/UIApplication/userDidTakeScreenshotNotification)

A notification that posts when a person takes a screenshot on the device.

### Discovering if your app is the default app in a category

[`isDefault(_:)`](/documentation/UIKit/UIApplication/isDefault(_:))

Reports whether this app is the person’s default app in the given category.

[`defaultStatusForCategory:error:`](/documentation/UIKit/UIApplication/defaultStatusForCategory:error:)

Reports whether this app is the person’s default app in the given category.

[`UIApplicationCategoryDefaultStatus`](/documentation/UIKit/UIApplicationCategoryDefaultStatus)

The default status of an application for some category.

[`UIApplication.Category`](/documentation/UIKit/UIApplication/Category)

Constants that describe the types of apps in the system.

[`UIApplication.CategoryDefaultError`](/documentation/UIKit/UIApplication/CategoryDefaultError)

Errors that can happen when the system checks if your app is the default app in a category.

[`UIApplicationCategoryDefaultErrorDomain`](/documentation/UIKit/UIApplicationCategoryDefaultErrorDomain)

A string that identifies errors the system encounters when it determines if your app is the default in a category.

[`UIApplicationCategoryDefaultRetryAvailabilityDateErrorKey`](/documentation/UIKit/UIApplicationCategoryDefaultRetryAvailabilityDateErrorKey)

A dictionary key, with a value that’s a date when a result is next available.

[`UIApplicationCategoryDefaultStatusLastProvidedDateErrorKey`](/documentation/UIKit/UIApplicationCategoryDefaultStatusLastProvidedDateErrorKey)

A dictionary key, with a value that’s the date your app last received a successful result.

### Deprecated

[Deprecated symbols](/documentation/UIKit/uiapplication-deprecated-symbols)

Review unsupported symbols and their replacements.



---

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)