UIApplicationDelegate UIApplicationDelegate Class

Definition

A class used to receive events raised by a UIApplication.

[Foundation.Protocol]
[Foundation.Register("UIApplicationDelegate", false)]
public class UIApplicationDelegate : Foundation.NSObject, IDisposable, UIKit.IUIApplicationDelegate
type UIApplicationDelegate = class
    inherit NSObject
    interface IUIApplicationDelegate
    interface INativeObject
    interface IDisposable
Inheritance
UIApplicationDelegateUIApplicationDelegate
Attributes
Implements

Remarks

A strongly typed implementation of a class that can be used to respond to events raised by the UIApplication.

Application developers will generally override the FinishedLaunching(IUIApplicationDelegate, UIApplication, NSDictionary) method, configure the application's main UIWindow, instantiate the top-level UIViewController, and assign it to the RootViewController.

This is what a minimal UIApplicationDelegate class looks like:


[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
	UIWindow window;
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
	window = new UIWindow (UIScreen.MainScreen.Bounds);
	window.RootViewController = new UIViewController ();
	window.MakeKeyAndVisible ();
	
	return true;
}

}

UIApplicationDelegate and the Application Lifecycle

The UIApplicationDelegate provides overridable methods for the entire application lifecycle:

Applications have four major modes:

As mentioned previously, the most commonly overridden method is FinishedLaunching(IUIApplicationDelegate, UIApplication, NSDictionary), which is the standard place to initialize the application's UIWindow and that window's RootViewController.

iOS applications should be designed to be long-lived, with many transitions between foreground processing and being suspended or backgrounded.

Assigning a UIApplicationDelegate

The UIApplicationDelegate of an application is typically set as one of few, or only, things done by the application's Main method. The UIApplicationDelegate exports a string using the RegisterAttribute and this string is used as the delegateClassName argument to the M:UIKit.UIApplication.Main(string[],string,string) method, as shown in the following example:


public class Application 
{
		static void Main(string[] args)
		{
			UIApplication.Main(args, null, "AppDelegate");
		}
	}

[Register ("AppDelegate")] public partial class AppDelegate : UIApplicationDelegate { //...etc }

Application's that are launched from a XIB or storyboard use the UIApplicationDelegate specified in the XIB or storyboard.

Constructors

UIApplicationDelegate() UIApplicationDelegate()

Default constructor that initializes a new instance of this class with no parameters.

UIApplicationDelegate(IntPtr) UIApplicationDelegate(IntPtr)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

UIApplicationDelegate(NSObjectFlag) UIApplicationDelegate(NSObjectFlag)

Constructor to call on derived classes to skip initialization and merely allocate the object.

Properties

Class Class Inherited from NSObject
ClassHandle ClassHandle

The handle for this class.

(Inherited from NSObject)
DebugDescription DebugDescription

A developer-meaningful description of this object.

(Inherited from NSObject)
Description Description

Description of the object, the Objective-C version of ToString.

(Inherited from NSObject)
Handle Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from NSObject)
IsDirectBinding IsDirectBinding Inherited from NSObject
IsProxy IsProxy Inherited from NSObject
RetainCount RetainCount

Returns the current Objective-C retain count for the object.

(Inherited from NSObject)
Self Self Inherited from NSObject
Superclass Superclass Inherited from NSObject
SuperHandle SuperHandle

Handle used to represent the methods in the base class for this NSObject.

(Inherited from NSObject)
Window Window

The window used to display the app on the device's main screen.

Zone Zone Inherited from NSObject

Methods

AccessibilityPerformMagicTap() AccessibilityPerformMagicTap()

Performs the most important action of the app. Often, this is toggling the most important state of the app.

AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr) AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using NSString keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr) AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using string keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>) AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>) AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
ApplicationSignificantTimeChange(UIApplication) ApplicationSignificantTimeChange(UIApplication)

Indicates a significant shift in time, such as midnight, carrier-changed time, or the start or stop of Daylight Savings.

AwakeFromNib() AwakeFromNib()

Called after the object has been loaded from the nib file. Overriders must call base.AwakeFromNib().

(Inherited from NSObject)
BeginInvokeOnMainThread(Action) BeginInvokeOnMainThread(Action) Inherited from NSObject
BeginInvokeOnMainThread(Selector, NSObject) BeginInvokeOnMainThread(Selector, NSObject)

Invokes asynchrously the specified code on the main UI thread.

(Inherited from NSObject)
Bind(NSString, NSObject, String, NSDictionary) Bind(NSString, NSObject, String, NSDictionary) Inherited from NSObject
Bind(String, NSObject, String, NSDictionary) Bind(String, NSObject, String, NSDictionary) Inherited from NSObject
BindingInfo(String) BindingInfo(String) Inherited from NSObject
BindingOptionDescriptions(String) BindingOptionDescriptions(String) Inherited from NSObject
BindingValueClass(String) BindingValueClass(String) Inherited from NSObject
ChangedStatusBarFrame(UIApplication, CGRect) ChangedStatusBarFrame(UIApplication, CGRect)

Indicates that the Frame of the status bar has changed.

CommitEditing() CommitEditing() Inherited from NSObject
CommitEditing(NSObject, Selector, IntPtr) CommitEditing(NSObject, Selector, IntPtr) Inherited from NSObject
ConformsToProtocol(IntPtr) ConformsToProtocol(IntPtr)

Invoked to determine if this object implements the specified protocol.

(Inherited from NSObject)
ContinueUserActivity(UIApplication, NSUserActivity, UIApplicationRestorationHandler) ContinueUserActivity(UIApplication, NSUserActivity, UIApplicationRestorationHandler)

Informs the app that there is data associated with continuing a task specified as a NSUserActivity object, and then returns whether the app continued the activity.

Copy() Copy()

Performs a copy of the underlying Objective-C object.

(Inherited from NSObject)
DangerousAutorelease() DangerousAutorelease() Inherited from NSObject
DangerousRelease() DangerousRelease() Inherited from NSObject
DangerousRetain() DangerousRetain() Inherited from NSObject
DidChange(NSKeyValueChange, NSIndexSet, NSString) DidChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates a change occurred to the indexes for a to-many relationship.

(Inherited from NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) DidChange(NSString, NSKeyValueSetMutationKind, NSSet) Inherited from NSObject
DidChangeStatusBarOrientation(UIApplication, UIInterfaceOrientation) DidChangeStatusBarOrientation(UIApplication, UIInterfaceOrientation)

Indicates that the orientation of the status bar has changed.

DidChangeValue(String) DidChangeValue(String)

Indicates that a change occurred on the specified key.

(Inherited from NSObject)
DidDecodeRestorableState(UIApplication, NSCoder) DidDecodeRestorableState(UIApplication, NSCoder)

Indicates that the app should restore highest-level state.

DidEnterBackground(UIApplication) DidEnterBackground(UIApplication)

Indicates that the application has entered the background.

DidFailToContinueUserActivitiy(UIApplication, String, NSError) DidFailToContinueUserActivitiy(UIApplication, String, NSError)

Informs the app that the activity of the userActivityType type could not be continued, and specifies a error as the reason for the failure.

DidReceiveRemoteNotification(UIApplication, NSDictionary, Action<UIBackgroundFetchResult>) DidReceiveRemoteNotification(UIApplication, NSDictionary, Action<UIBackgroundFetchResult>)

Remote background notification support: Invoked by operating system when your application received a remote notification.

DidRegisterUserNotificationSettings(UIApplication, UIUserNotificationSettings) DidRegisterUserNotificationSettings(UIApplication, UIUserNotificationSettings)

Developers should not use this deprecated method. Developers should use 'UNUserNotificationCenter.RequestAuthorization' instead.

Dispose() Dispose()

Releases the resources used by the NSObject object.

(Inherited from NSObject)
Dispose(Boolean) Dispose(Boolean)

Releases the resources used by the NSObject object.

(Inherited from NSObject)
DoesNotRecognizeSelector(Selector) DoesNotRecognizeSelector(Selector)

Indicates that this object does not recognize the specified selector.

(Inherited from NSObject)
Equals(NSObject) Equals(NSObject) Inherited from NSObject
Equals(Object) Equals(Object) Inherited from NSObject
ExposedBindings() ExposedBindings() Inherited from NSObject
FailedToRegisterForRemoteNotifications(UIApplication, NSError) FailedToRegisterForRemoteNotifications(UIApplication, NSError)

Indicates that a call to RegisterForRemoteNotifications() failed.

FinishedLaunching(UIApplication) FinishedLaunching(UIApplication)

Method invoked after the application has launched to configure the main window and view controller.

FinishedLaunching(UIApplication, NSDictionary) FinishedLaunching(UIApplication, NSDictionary)

Method invoked after the application has launched to configure the main window and view controller.

GetBindingInfo(NSString) GetBindingInfo(NSString) Inherited from NSObject
GetBindingOptionDescriptions(NSString) GetBindingOptionDescriptions(NSString) Inherited from NSObject
GetBindingValueClass(NSString) GetBindingValueClass(NSString) Inherited from NSObject
GetDictionaryOfValuesFromKeys(NSString[]) GetDictionaryOfValuesFromKeys(NSString[])

Retrieves the values of the specified keys.

(Inherited from NSObject)
GetHashCode() GetHashCode()

Generates a hash code for the current instance.

(Inherited from NSObject)
GetMethodForSelector(Selector) GetMethodForSelector(Selector) Inherited from NSObject
GetNativeField(String) GetNativeField(String) Inherited from NSObject
GetNativeHash() GetNativeHash() Inherited from NSObject
GetSupportedInterfaceOrientations(UIApplication, UIWindow) GetSupportedInterfaceOrientations(UIApplication, UIWindow)

Returns a bit-mask of supported orientations for the specified forWindow.

GetViewController(UIApplication, String[], NSCoder) GetViewController(UIApplication, String[], NSCoder)

Retrieve the UIViewController identified by the restorationIdentifierComponents.

HandleAction(UIApplication, String, NSDictionary, Action) HandleAction(UIApplication, String, NSDictionary, Action)

Informs the app of a custom action to perform based on a push notification, and includes the actionIdentifier value, remoteNoticationInfo data from the notification, and completionHandler for the app developer to run after performing the action.

HandleAction(UIApplication, String, NSDictionary, NSDictionary, Action) HandleAction(UIApplication, String, NSDictionary, NSDictionary, Action)

Informs the app of a custom action to perform based on a remote notification, and includes the actionIdentifier value, remoteNoticationInfo data from the notification, and completionHandler for the app developer to run after performing the action.

HandleAction(UIApplication, String, UILocalNotification, Action) HandleAction(UIApplication, String, UILocalNotification, Action)

Informs the app that the user selected an action identified by the actionIdentifier value from an alert of a UILocalNotification object, and executes the completionHandler block after it completes the action.

HandleAction(UIApplication, String, UILocalNotification, NSDictionary, Action) HandleAction(UIApplication, String, UILocalNotification, NSDictionary, Action)

Informs the app of a custom action to perform based on a local notification, and includes the actionIdentifier value, responseInfo data from the notification, and completionHandler for the app developer to run after performing the action.

HandleEventsForBackgroundUrl(UIApplication, String, Action) HandleEventsForBackgroundUrl(UIApplication, String, Action)

All background transfers in sessionIdentifier are finished, or authentication is required. The application should update its interface and then run completionHander.

HandleIntent(UIApplication, INIntent, Action<INIntentResponse>) HandleIntent(UIApplication, INIntent, Action<INIntentResponse>)

The system is requesting that the application handle the specified intent.

HandleOpenURL(UIApplication, NSUrl) HandleOpenURL(UIApplication, NSUrl)

M:UIKit.UIApplicationDelegate.OpenUrl*

HandleWatchKitExtensionRequest(UIApplication, NSDictionary, Action<NSDictionary>) HandleWatchKitExtensionRequest(UIApplication, NSDictionary, Action<NSDictionary>)

A watchkit extension has made a request.

Init() Init() Inherited from NSObject
InitializeHandle(IntPtr) InitializeHandle(IntPtr) Inherited from NSObject
InitializeHandle(IntPtr, String) InitializeHandle(IntPtr, String) Inherited from NSObject
Invoke(Action, Double) Invoke(Action, Double) Inherited from NSObject
Invoke(Action, TimeSpan) Invoke(Action, TimeSpan) Inherited from NSObject
InvokeOnMainThread(Action) InvokeOnMainThread(Action) Inherited from NSObject
InvokeOnMainThread(Selector, NSObject) InvokeOnMainThread(Selector, NSObject)

Invokes synchrously the specified code on the main UI thread.

(Inherited from NSObject)
IsEqual(NSObject) IsEqual(NSObject) Inherited from NSObject
IsKindOfClass(Class) IsKindOfClass(Class) Inherited from NSObject
IsMemberOfClass(Class) IsMemberOfClass(Class) Inherited from NSObject
MarkDirty() MarkDirty()

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

(Inherited from NSObject)
MutableCopy() MutableCopy()

Creates a mutable copy of the specified NSObject.

(Inherited from NSObject)
ObjectDidEndEditing(NSObject) ObjectDidEndEditing(NSObject) Inherited from NSObject
ObserveValue(NSString, NSObject, NSDictionary, IntPtr) ObserveValue(NSString, NSObject, NSDictionary, IntPtr)

Indicates that the value at the specified keyPath relative to this object has changed.

(Inherited from NSObject)
OnActivated(UIApplication) OnActivated(UIApplication)

Called when the application is launched and every time the app returns to the foreground.

OnResignActivation(UIApplication) OnResignActivation(UIApplication)

Called when the application is about to enter the background, be suspended, or when the user receives an interruption such as a phone call or text.

OpenUrl(UIApplication, NSUrl, NSDictionary) OpenUrl(UIApplication, NSUrl, NSDictionary)

Indicates that the application should open the specified url with context from options.

OpenUrl(UIApplication, NSUrl, String, NSObject) OpenUrl(UIApplication, NSUrl, String, NSObject)

Indicates that the application should open the specified url.

OpenUrl(UIApplication, NSUrl, UIApplicationOpenUrlOptions) OpenUrl(UIApplication, NSUrl, UIApplicationOpenUrlOptions)

Indicates that the application should open the specified url according to options.

PerformActionForShortcutItem(UIApplication, UIApplicationShortcutItem, UIOperationHandler) PerformActionForShortcutItem(UIApplication, UIApplicationShortcutItem, UIOperationHandler)

Called by the system when the user initiates a Home screen quick action, unless the interaction was handled in WillFinishLaunching(UIApplication, NSDictionary) or M:UIKit.UIApplicationDelegate.DidFinishLaunching*.

PerformFetch(UIApplication, Action<UIBackgroundFetchResult>) PerformFetch(UIApplication, Action<UIBackgroundFetchResult>)

Background support: Invoked by the operating system to allow an application to download data.

PerformSelector(Selector) PerformSelector(Selector) Inherited from NSObject
PerformSelector(Selector, NSObject) PerformSelector(Selector, NSObject) Inherited from NSObject
PerformSelector(Selector, NSObject, Double) PerformSelector(Selector, NSObject, Double)

Invokes the selector on the current instance and if the obj is not null, it passes this as its single parameter.

(Inherited from NSObject)
PerformSelector(Selector, NSObject, Double, NSString[]) PerformSelector(Selector, NSObject, Double, NSString[]) Inherited from NSObject
PerformSelector(Selector, NSObject, NSObject) PerformSelector(Selector, NSObject, NSObject) Inherited from NSObject
PerformSelector(Selector, NSThread, NSObject, Boolean) PerformSelector(Selector, NSThread, NSObject, Boolean) Inherited from NSObject
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) Inherited from NSObject
PrepareForInterfaceBuilder() PrepareForInterfaceBuilder() Inherited from NSObject
ProtectedDataDidBecomeAvailable(UIApplication) ProtectedDataDidBecomeAvailable(UIApplication)

Indicates that the device was unlocked and previously-encrypted data is now available.

ProtectedDataWillBecomeUnavailable(UIApplication) ProtectedDataWillBecomeUnavailable(UIApplication)

Indicates that the device is being locked and that protected files will become unavailable.

ReceivedLocalNotification(UIApplication, UILocalNotification) ReceivedLocalNotification(UIApplication, UILocalNotification)

Indicates that the application received a UILocalNotification.

ReceivedRemoteNotification(UIApplication, NSDictionary) ReceivedRemoteNotification(UIApplication, NSDictionary)

Indicates that the application received a remote notification.

ReceiveMemoryWarning(UIApplication) ReceiveMemoryWarning(UIApplication)

The app has received a low-memory warning from the system.

RegisteredForRemoteNotifications(UIApplication, NSData) RegisteredForRemoteNotifications(UIApplication, NSData)

Indicates that a call to RegisterForRemoteNotifications() succeeded.

RemoveObserver(NSObject, NSString) RemoveObserver(NSObject, NSString)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, NSString, IntPtr) RemoveObserver(NSObject, NSString, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RemoveObserver(NSObject, String) RemoveObserver(NSObject, String)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, String, IntPtr) RemoveObserver(NSObject, String, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RespondsToSelector(Selector) RespondsToSelector(Selector)

Whether this object recognizes the specified selector.

(Inherited from NSObject)
SetNativeField(String, NSObject) SetNativeField(String, NSObject) Inherited from NSObject
SetNilValueForKey(NSString) SetNilValueForKey(NSString)

Sets the value of the specified key to null.

(Inherited from NSObject)
SetValueForKey(NSObject, NSString) SetValueForKey(NSObject, NSString)

Sets the value of the property specified by the key to the specified value.

(Inherited from NSObject)
SetValueForKeyPath(IntPtr, NSString) SetValueForKeyPath(IntPtr, NSString)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

(Inherited from NSObject)
SetValueForKeyPath(NSObject, NSString) SetValueForKeyPath(NSObject, NSString)

Sets the value of a property that can be reached using a keypath.

(Inherited from NSObject)
SetValueForUndefinedKey(NSObject, NSString) SetValueForUndefinedKey(NSObject, NSString)

Indicates an attempt to write a value to an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
SetValuesForKeysWithDictionary(NSDictionary) SetValuesForKeysWithDictionary(NSDictionary)

Sets the values of this NSObject to those in the specified dictionary.

(Inherited from NSObject)
ShouldAllowExtensionPointIdentifier(UIApplication, NSString) ShouldAllowExtensionPointIdentifier(UIApplication, NSString)

Requests permission from the app to run app extensions based on the extension point identified by extensionPointIdentifier.

ShouldRequestHealthAuthorization(UIApplication) ShouldRequestHealthAuthorization(UIApplication)

The system calls this method when the developer's app should ask the user for access to HealthKit data.

ShouldRestoreApplicationState(UIApplication, NSCoder) ShouldRestoreApplicationState(UIApplication, NSCoder)

Whether the application should restore saved state information.

ShouldSaveApplicationState(UIApplication, NSCoder) ShouldSaveApplicationState(UIApplication, NSCoder)

Whether the application should save application state information.

ToString() ToString()

Returns a string representation of the value of the current instance.

(Inherited from NSObject)
Unbind(NSString) Unbind(NSString) Inherited from NSObject
Unbind(String) Unbind(String) Inherited from NSObject
UserActivityUpdated(UIApplication, NSUserActivity) UserActivityUpdated(UIApplication, NSUserActivity)

A user activity was updated.

UserDidAcceptCloudKitShare(UIApplication, CKShareMetadata) UserDidAcceptCloudKitShare(UIApplication, CKShareMetadata)
ValueForKey(NSString) ValueForKey(NSString)

Returns the value of the property associated with the specified key.

(Inherited from NSObject)
ValueForKeyPath(NSString) ValueForKeyPath(NSString)

Returns the value of a property that can be reached using a keypath.

(Inherited from NSObject)
ValueForUndefinedKey(NSString) ValueForUndefinedKey(NSString)

Indicates an attempt to read a value of an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
WillChange(NSKeyValueChange, NSIndexSet, NSString) WillChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates that the values of the specified indices in the specified key are about to change.

(Inherited from NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) WillChange(NSString, NSKeyValueSetMutationKind, NSSet) Inherited from NSObject
WillChangeStatusBarFrame(UIApplication, CGRect) WillChangeStatusBarFrame(UIApplication, CGRect)

Indicates that the frame of the status bar will change shortly.

WillChangeStatusBarOrientation(UIApplication, UIInterfaceOrientation, Double) WillChangeStatusBarOrientation(UIApplication, UIInterfaceOrientation, Double)

Indicates that the orientation of the status bar will change shortly.

WillChangeValue(String) WillChangeValue(String)

Indicates that the value of the specified key is about to change.

(Inherited from NSObject)
WillContinueUserActivity(UIApplication, String) WillContinueUserActivity(UIApplication, String)

Informs the app that the user is attempting to continue a userActivityType action for which data might not be available, and returns to notify the user that the app will continue the activity.

WillEncodeRestorableState(UIApplication, NSCoder) WillEncodeRestorableState(UIApplication, NSCoder)

Indicates that the app is about to store application state data.

WillEnterForeground(UIApplication) WillEnterForeground(UIApplication)

Called prior to the application returning from a backgrounded state.

WillFinishLaunching(UIApplication, NSDictionary) WillFinishLaunching(UIApplication, NSDictionary)

Indicates that launching has begun, but state restoration has not yet occurred.

WillTerminate(UIApplication) WillTerminate(UIApplication)

Called if the application is being terminated due to memory constraints or directly by the user.

Extension Methods

GetDebugDescription(INSObjectProtocol) GetDebugDescription(INSObjectProtocol)
GetAccessibilityCustomRotors(NSObject) GetAccessibilityCustomRotors(NSObject)

Gets the array of UIAccessibilityCustomRotor objects appropriate for this object.

SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[]) SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

Sets the array of UIAccessibilityCustomRotor objects appropriate for this object.

AccessibilityPerformMagicTap(IUIApplicationDelegate) AccessibilityPerformMagicTap(IUIApplicationDelegate)

Performs the most important action of the app. Often, this is toggling the most important state of the app.

ApplicationSignificantTimeChange(IUIApplicationDelegate, UIApplication) ApplicationSignificantTimeChange(IUIApplicationDelegate, UIApplication)

Indicates a significant change in time, such as midnight, change to Daylight Savings, or a shift in timezone.

ChangedStatusBarFrame(IUIApplicationDelegate, UIApplication, CGRect) ChangedStatusBarFrame(IUIApplicationDelegate, UIApplication, CGRect)

Indicates that the frame of the status bar has changed.

ContinueUserActivity(IUIApplicationDelegate, UIApplication, NSUserActivity, UIApplicationRestorationHandler) ContinueUserActivity(IUIApplicationDelegate, UIApplication, NSUserActivity, UIApplicationRestorationHandler)

Informs the app that there is data associated with continuing a task specified as a NSUserActivity object, and then returns whether the app continued the activity.

DidChangeStatusBarOrientation(IUIApplicationDelegate, UIApplication, UIInterfaceOrientation) DidChangeStatusBarOrientation(IUIApplicationDelegate, UIApplication, UIInterfaceOrientation)

Indicates that the orientation of the status bar has changed.

DidDecodeRestorableState(IUIApplicationDelegate, UIApplication, NSCoder) DidDecodeRestorableState(IUIApplicationDelegate, UIApplication, NSCoder)

Indicates that the app should restore highest-level state.

DidEnterBackground(IUIApplicationDelegate, UIApplication) DidEnterBackground(IUIApplicationDelegate, UIApplication)

Indicates that the application has entered the background.

DidFailToContinueUserActivitiy(IUIApplicationDelegate, UIApplication, String, NSError) DidFailToContinueUserActivitiy(IUIApplicationDelegate, UIApplication, String, NSError)

Informs the app that the activity of the userActivityType type could not be continued, and specifies a error as the reason for the failure.

DidReceiveRemoteNotification(IUIApplicationDelegate, UIApplication, NSDictionary, Action<UIBackgroundFetchResult>) DidReceiveRemoteNotification(IUIApplicationDelegate, UIApplication, NSDictionary, Action<UIBackgroundFetchResult>)

Indicates that the app received a remote notification.

DidRegisterUserNotificationSettings(IUIApplicationDelegate, UIApplication, UIUserNotificationSettings) DidRegisterUserNotificationSettings(IUIApplicationDelegate, UIApplication, UIUserNotificationSettings)

Developers should not use this deprecated method. Developers should use 'UNUserNotificationCenter.RequestAuthorization' instead.

FailedToRegisterForRemoteNotifications(IUIApplicationDelegate, UIApplication, NSError) FailedToRegisterForRemoteNotifications(IUIApplicationDelegate, UIApplication, NSError)

Indicates that Apple Push Service did not successfully compete the registration process.

FinishedLaunching(IUIApplicationDelegate, UIApplication) FinishedLaunching(IUIApplicationDelegate, UIApplication)

The application has finished launching.

FinishedLaunching(IUIApplicationDelegate, UIApplication, NSDictionary) FinishedLaunching(IUIApplicationDelegate, UIApplication, NSDictionary)

Indicates that launching has finished and the app will shortly begin running.

GetSupportedInterfaceOrientations(IUIApplicationDelegate, UIApplication, UIWindow) GetSupportedInterfaceOrientations(IUIApplicationDelegate, UIApplication, UIWindow)

The interface orientations supported by the app.

GetViewController(IUIApplicationDelegate, UIApplication, String[], NSCoder) GetViewController(IUIApplicationDelegate, UIApplication, String[], NSCoder)

Retrieves the UIViewController identified by the last value in the restorationIdentifierComponents parameter.

GetWindow(IUIApplicationDelegate) GetWindow(IUIApplicationDelegate)
HandleAction(IUIApplicationDelegate, UIApplication, String, NSDictionary, NSDictionary, Action) HandleAction(IUIApplicationDelegate, UIApplication, String, NSDictionary, NSDictionary, Action)

Informs the app of a custom action to perform based on a remote notification, and includes the actionIdentifier value, remoteNoticationInfo data from the notification, and completionHandler for the app developer to run after performing the action.

HandleAction(IUIApplicationDelegate, UIApplication, String, NSDictionary, Action) HandleAction(IUIApplicationDelegate, UIApplication, String, NSDictionary, Action)

Informs the app of a custom action to perform based on a push notification, and includes the actionIdentifier value, remoteNoticationInfo data from the notification, and completionHandler for the app developer to run after performing the action.

HandleAction(IUIApplicationDelegate, UIApplication, String, UILocalNotification, NSDictionary, Action) HandleAction(IUIApplicationDelegate, UIApplication, String, UILocalNotification, NSDictionary, Action)

Informs the app of a custom action to perform based on a local notification, and includes the actionIdentifier value, responseInfo data from the notification, and completionHandler for the app developer to run after performing the action.

HandleAction(IUIApplicationDelegate, UIApplication, String, UILocalNotification, Action) HandleAction(IUIApplicationDelegate, UIApplication, String, UILocalNotification, Action)

Informs the app that the user selected an action identified by the actionIdentifier value from an alert of a UILocalNotification object, and executes the completionHandler block after it completes the action.

HandleEventsForBackgroundUrl(IUIApplicationDelegate, UIApplication, String, Action) HandleEventsForBackgroundUrl(IUIApplicationDelegate, UIApplication, String, Action)

T:UIKit.NSUrlSession

HandleIntent(IUIApplicationDelegate, UIApplication, INIntent, Action<INIntentResponse>) HandleIntent(IUIApplicationDelegate, UIApplication, INIntent, Action<INIntentResponse>)

The system is requesting that the application handle the specified intent.

HandleOpenURL(IUIApplicationDelegate, UIApplication, NSUrl) HandleOpenURL(IUIApplicationDelegate, UIApplication, NSUrl)

M:UIKit.UIApplicationDelegate.OpenUrl*

HandleWatchKitExtensionRequest(IUIApplicationDelegate, UIApplication, NSDictionary, Action<NSDictionary>) HandleWatchKitExtensionRequest(IUIApplicationDelegate, UIApplication, NSDictionary, Action<NSDictionary>)

A watchkit extension has made a request.

OnActivated(IUIApplicationDelegate, UIApplication) OnActivated(IUIApplicationDelegate, UIApplication)

The app has moved from the inactive to actie state.

OnResignActivation(IUIApplicationDelegate, UIApplication) OnResignActivation(IUIApplicationDelegate, UIApplication)

The app is about to move from the active state to the inactive state.

OpenUrl(IUIApplicationDelegate, UIApplication, NSUrl, NSDictionary) OpenUrl(IUIApplicationDelegate, UIApplication, NSUrl, NSDictionary)

Indicates that the application should open the specified url with context from options.

OpenUrl(IUIApplicationDelegate, UIApplication, NSUrl, String, NSObject) OpenUrl(IUIApplicationDelegate, UIApplication, NSUrl, String, NSObject)

Loads a resource from the specified URL.

PerformActionForShortcutItem(IUIApplicationDelegate, UIApplication, UIApplicationShortcutItem, UIOperationHandler) PerformActionForShortcutItem(IUIApplicationDelegate, UIApplication, UIApplicationShortcutItem, UIOperationHandler)

Called by the system when the user initiates a Home screen quick action, unless the interaction was handled in WillFinishLaunching(UIApplication, NSDictionary) or M:UIKit.UIApplicationDelegate.DidFinishLaunching*.

PerformFetch(IUIApplicationDelegate, UIApplication, Action<UIBackgroundFetchResult>) PerformFetch(IUIApplicationDelegate, UIApplication, Action<UIBackgroundFetchResult>)

Indicates that the application can begin a fetch operation if it has data to download.

ProtectedDataDidBecomeAvailable(IUIApplicationDelegate, UIApplication) ProtectedDataDidBecomeAvailable(IUIApplicationDelegate, UIApplication)

Protected files are now available.

ProtectedDataWillBecomeUnavailable(IUIApplicationDelegate, UIApplication) ProtectedDataWillBecomeUnavailable(IUIApplicationDelegate, UIApplication)

Indicates that protected files are about to be encrypted and unavailable for reading.

ReceivedLocalNotification(IUIApplicationDelegate, UIApplication, UILocalNotification) ReceivedLocalNotification(IUIApplicationDelegate, UIApplication, UILocalNotification)

Indicates that the app received a local notification.

ReceivedRemoteNotification(IUIApplicationDelegate, UIApplication, NSDictionary) ReceivedRemoteNotification(IUIApplicationDelegate, UIApplication, NSDictionary)

Indicates that the app received a remote notification.

ReceiveMemoryWarning(IUIApplicationDelegate, UIApplication) ReceiveMemoryWarning(IUIApplicationDelegate, UIApplication)

The app has received a low-memory warning from the system.

RegisteredForRemoteNotifications(IUIApplicationDelegate, UIApplication, NSData) RegisteredForRemoteNotifications(IUIApplicationDelegate, UIApplication, NSData)

Indicates that the device successfully registered with Apple Push Service.

SetWindow(IUIApplicationDelegate, UIWindow) SetWindow(IUIApplicationDelegate, UIWindow)
ShouldAllowExtensionPointIdentifier(IUIApplicationDelegate, UIApplication, NSString) ShouldAllowExtensionPointIdentifier(IUIApplicationDelegate, UIApplication, NSString)

Requests permission from the app to run app extensions based on the extension point identified by extensionPointIdentifier.

ShouldRequestHealthAuthorization(IUIApplicationDelegate, UIApplication) ShouldRequestHealthAuthorization(IUIApplicationDelegate, UIApplication)

The system calls this method when the developer's app should ask the user for access to HealthKit data.

ShouldRestoreApplicationState(IUIApplicationDelegate, UIApplication, NSCoder) ShouldRestoreApplicationState(IUIApplicationDelegate, UIApplication, NSCoder)

Whether the application should restore saved state information.

ShouldSaveApplicationState(IUIApplicationDelegate, UIApplication, NSCoder) ShouldSaveApplicationState(IUIApplicationDelegate, UIApplication, NSCoder)

Whether the application should save application state information.

UserActivityUpdated(IUIApplicationDelegate, UIApplication, NSUserActivity) UserActivityUpdated(IUIApplicationDelegate, UIApplication, NSUserActivity)

Informs the app that the NSUserActivity object in userActivity has been updated.

UserDidAcceptCloudKitShare(IUIApplicationDelegate, UIApplication, CKShareMetadata) UserDidAcceptCloudKitShare(IUIApplicationDelegate, UIApplication, CKShareMetadata)
WillChangeStatusBarFrame(IUIApplicationDelegate, UIApplication, CGRect) WillChangeStatusBarFrame(IUIApplicationDelegate, UIApplication, CGRect)

Indicates that the frame of the status bar is about to change.

WillChangeStatusBarOrientation(IUIApplicationDelegate, UIApplication, UIInterfaceOrientation, Double) WillChangeStatusBarOrientation(IUIApplicationDelegate, UIApplication, UIInterfaceOrientation, Double)

Indicates that the orientation of the status bar is about to change.

WillContinueUserActivity(IUIApplicationDelegate, UIApplication, String) WillContinueUserActivity(IUIApplicationDelegate, UIApplication, String)

Informs the app that the user is attempting to continue a userActivityType action for which data might not be available, and returns to notify the user that the app will continue the activity.

WillEncodeRestorableState(IUIApplicationDelegate, UIApplication, NSCoder) WillEncodeRestorableState(IUIApplicationDelegate, UIApplication, NSCoder)

Indicates that the app is about to store application state data.

WillEnterForeground(IUIApplicationDelegate, UIApplication) WillEnterForeground(IUIApplicationDelegate, UIApplication)

Indicates that the application is about to enter the foreground.

WillFinishLaunching(IUIApplicationDelegate, UIApplication, NSDictionary) WillFinishLaunching(IUIApplicationDelegate, UIApplication, NSDictionary)

Indicates that the app is about to finish its launching procedures.

WillTerminate(IUIApplicationDelegate, UIApplication) WillTerminate(IUIApplicationDelegate, UIApplication)

Indicates that the app is about to terminate.

Applies to

See also