Package apple.uikit.protocol
Interface UIApplicationDelegate
-
- All Known Subinterfaces:
CPApplicationDelegate
public interface UIApplicationDelegate
-
-
Nested Class Summary
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default UISceneConfigurationapplicationConfigurationForConnectingSceneSessionOptions(UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options)Called when the UIKit is about to create & vend a new UIScene instance to the application.default booleanapplicationContinueUserActivityRestorationHandler(UIApplication application, NSUserActivity userActivity, UIApplicationDelegate.Block_applicationContinueUserActivityRestorationHandler restorationHandler)Called on the main thread after the NSUserActivity object is available.default voidapplicationDidBecomeActive(UIApplication application)default voidapplicationDidChangeStatusBarFrame(UIApplication application, CGRect oldStatusBarFrame)default voidapplicationDidChangeStatusBarOrientation(UIApplication application, long oldStatusBarOrientation)default voidapplicationDidDecodeRestorableStateWithCoder(UIApplication application, NSCoder coder)default voidapplicationDidDiscardSceneSessions(UIApplication application, NSSet<? extends UISceneSession> sceneSessions)Called when the system, due to a user interaction or a request from the application itself, removes one or more representation from the -[UIApplication openSessions] set If sessions are discarded while the application is not running, this method is called shortly after the applications next launch.default voidapplicationDidEnterBackground(UIApplication application)default voidapplicationDidFailToContinueUserActivityWithTypeError(UIApplication application, java.lang.String userActivityType, NSError error)If the user activity cannot be fetched after willContinueUserActivityWithType is called, this will be called on the main thread when implemented.default voidapplicationDidFailToRegisterForRemoteNotificationsWithError(UIApplication application, NSError error)default voidapplicationDidFinishLaunching(UIApplication application)default booleanapplicationDidFinishLaunchingWithOptions(UIApplication application, NSDictionary<java.lang.String,?> launchOptions)default voidapplicationDidReceiveLocalNotification(UIApplication application, UILocalNotification notification)default voidapplicationDidReceiveMemoryWarning(UIApplication application)try to clean up as much memory as possible. next step is to terminate appdefault voidapplicationDidReceiveRemoteNotification(UIApplication application, NSDictionary<?,?> userInfo)default voidapplicationDidReceiveRemoteNotificationFetchCompletionHandler(UIApplication application, NSDictionary<?,?> userInfo, UIApplicationDelegate.Block_applicationDidReceiveRemoteNotificationFetchCompletionHandler completionHandler)This delegate method offers an opportunity for applications with the "remote-notification" background mode to fetch appropriate new data in response to an incoming remote notification.default voidapplicationDidRegisterForRemoteNotificationsWithDeviceToken(UIApplication application, NSData deviceToken)default voidapplicationDidRegisterUserNotificationSettings(UIApplication application, UIUserNotificationSettings notificationSettings)This callback will be made upon calling -[UIApplication registerUserNotificationSettings:].default voidapplicationDidUpdateUserActivity(UIApplication application, NSUserActivity userActivity)This is called on the main thread when a user activity managed by UIKit has been updated.default voidapplicationHandleActionWithIdentifierForLocalNotificationCompletionHandler(UIApplication application, java.lang.String identifier, UILocalNotification notification, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForLocalNotificationCompletionHandler completionHandler)Called when your app has been activated by the user selecting an action from a local notification.default voidapplicationHandleActionWithIdentifierForLocalNotificationWithResponseInfoCompletionHandler(UIApplication application, java.lang.String identifier, UILocalNotification notification, NSDictionary<?,?> responseInfo, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForLocalNotificationWithResponseInfoCompletionHandler completionHandler)default voidapplicationHandleActionWithIdentifierForRemoteNotificationCompletionHandler(UIApplication application, java.lang.String identifier, NSDictionary<?,?> userInfo, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForRemoteNotificationCompletionHandler completionHandler)Called when your app has been activated by the user selecting an action from a remote notification.default voidapplicationHandleActionWithIdentifierForRemoteNotificationWithResponseInfoCompletionHandler(UIApplication application, java.lang.String identifier, NSDictionary<?,?> userInfo, NSDictionary<?,?> responseInfo, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForRemoteNotificationWithResponseInfoCompletionHandler completionHandler)default voidapplicationHandleEventsForBackgroundURLSessionCompletionHandler(UIApplication application, java.lang.String identifier, UIApplicationDelegate.Block_applicationHandleEventsForBackgroundURLSessionCompletionHandler completionHandler)Applications using an NSURLSession with a background configuration may be launched or resumed in the background in order to handle the completion of tasks in that session, or to handle authentication.default voidapplicationHandleIntentCompletionHandler(UIApplication application, INIntent intent, UIApplicationDelegate.Block_applicationHandleIntentCompletionHandler completionHandler)default booleanapplicationHandleOpenURL(UIApplication application, NSURL url)Deprecated.default java.lang.ObjectapplicationHandlerForIntent(UIApplication application, INIntent intent)default voidapplicationHandleWatchKitExtensionRequestReply(UIApplication application, NSDictionary<?,?> userInfo, UIApplicationDelegate.Block_applicationHandleWatchKitExtensionRequestReply reply)default booleanapplicationOpenURLOptions(UIApplication app, NSURL url, NSDictionary<java.lang.String,?> options)no equiv. notification. return NO if the application can't open for some reasondefault booleanapplicationOpenURLSourceApplicationAnnotation(UIApplication application, NSURL url, java.lang.String sourceApplication, java.lang.Object annotation)Deprecated.default voidapplicationPerformActionForShortcutItemCompletionHandler(UIApplication application, UIApplicationShortcutItem shortcutItem, UIApplicationDelegate.Block_applicationPerformActionForShortcutItemCompletionHandler completionHandler)Called when the user activates your application by selecting a shortcut on the home screen, except when -application:willFinishLaunchingWithOptions: or -application:didFinishLaunchingWithOptions returns NO.default voidapplicationPerformFetchWithCompletionHandler(UIApplication application, UIApplicationDelegate.Block_applicationPerformFetchWithCompletionHandler completionHandler)Applications with the "fetch" background mode may be given opportunities to fetch updated content in the background or when it is convenient for the system.default voidapplicationProtectedDataDidBecomeAvailable(UIApplication application)default voidapplicationProtectedDataWillBecomeUnavailable(UIApplication application)default booleanapplicationShouldAllowExtensionPointIdentifier(UIApplication application, java.lang.String extensionPointIdentifier)Applications may reject specific types of extensions based on the extension point identifier.default voidapplicationShouldRequestHealthAuthorization(UIApplication application)default booleanapplicationShouldRestoreApplicationState(UIApplication application, NSCoder coder)default booleanapplicationShouldRestoreSecureApplicationState(UIApplication application, NSCoder coder)default booleanapplicationShouldSaveApplicationState(UIApplication application, NSCoder coder)Deprecated State Restoration opt-in methods:default booleanapplicationShouldSaveSecureApplicationState(UIApplication application, NSCoder coder)default voidapplicationSignificantTimeChange(UIApplication application)midnight, carrier time update, daylight savings time changedefault longapplicationSupportedInterfaceOrientationsForWindow(UIApplication application, UIWindow window)default voidapplicationUserDidAcceptCloudKitShareWithMetadata(UIApplication application, CKShareMetadata cloudKitShareMetadata)This will be called on the main thread after the user indicates they want to accept a CloudKit sharing invitation in your application.default UIViewControllerapplicationViewControllerWithRestorationIdentifierPathCoder(UIApplication application, NSArray<java.lang.String> identifierComponents, NSCoder coder)default voidapplicationWillChangeStatusBarFrame(UIApplication application, CGRect newStatusBarFrame)in screen coordinatesdefault voidapplicationWillChangeStatusBarOrientationDuration(UIApplication application, long newStatusBarOrientation, double duration)default booleanapplicationWillContinueUserActivityWithType(UIApplication application, java.lang.String userActivityType)Called on the main thread as soon as the user indicates they want to continue an activity in your application.default voidapplicationWillEncodeRestorableStateWithCoder(UIApplication application, NSCoder coder)default voidapplicationWillEnterForeground(UIApplication application)default booleanapplicationWillFinishLaunchingWithOptions(UIApplication application, NSDictionary<java.lang.String,?> launchOptions)default voidapplicationWillResignActive(UIApplication application)default voidapplicationWillTerminate(UIApplication application)default voidsetWindow(UIWindow value)default UIWindowwindow()
-
-
-
Method Detail
-
applicationContinueUserActivityRestorationHandler
default boolean applicationContinueUserActivityRestorationHandler(UIApplication application, NSUserActivity userActivity, UIApplicationDelegate.Block_applicationContinueUserActivityRestorationHandler restorationHandler)
Called on the main thread after the NSUserActivity object is available. Use the data you stored in the NSUserActivity object to re-create what the user was doing. You can create/fetch any restorable objects associated with the user activity, and pass them to the restorationHandler. They will then have the UIResponder restoreUserActivityState: method invoked with the user activity. Invoking the restorationHandler is optional. It may be copied and invoked later, and it will bounce to the main thread to complete its work and call restoreUserActivityState on all objects.
-
applicationDidChangeStatusBarFrame
default void applicationDidChangeStatusBarFrame(UIApplication application, CGRect oldStatusBarFrame)
-
applicationDidChangeStatusBarOrientation
default void applicationDidChangeStatusBarOrientation(UIApplication application, long oldStatusBarOrientation)
-
applicationDidDecodeRestorableStateWithCoder
default void applicationDidDecodeRestorableStateWithCoder(UIApplication application, NSCoder coder)
-
applicationDidFailToContinueUserActivityWithTypeError
default void applicationDidFailToContinueUserActivityWithTypeError(UIApplication application, java.lang.String userActivityType, NSError error)
If the user activity cannot be fetched after willContinueUserActivityWithType is called, this will be called on the main thread when implemented.
-
applicationDidFailToRegisterForRemoteNotificationsWithError
default void applicationDidFailToRegisterForRemoteNotificationsWithError(UIApplication application, NSError error)
-
applicationDidFinishLaunchingWithOptions
default boolean applicationDidFinishLaunchingWithOptions(UIApplication application, NSDictionary<java.lang.String,?> launchOptions)
-
applicationDidReceiveLocalNotification
default void applicationDidReceiveLocalNotification(UIApplication application, UILocalNotification notification)
-
applicationDidReceiveRemoteNotification
default void applicationDidReceiveRemoteNotification(UIApplication application, NSDictionary<?,?> userInfo)
-
applicationDidReceiveRemoteNotificationFetchCompletionHandler
default void applicationDidReceiveRemoteNotificationFetchCompletionHandler(UIApplication application, NSDictionary<?,?> userInfo, UIApplicationDelegate.Block_applicationDidReceiveRemoteNotificationFetchCompletionHandler completionHandler)
This delegate method offers an opportunity for applications with the "remote-notification" background mode to fetch appropriate new data in response to an incoming remote notification. You should call the fetchCompletionHandler as soon as you're finished performing that operation, so the system can accurately estimate its power and data cost. This method will be invoked even if the application was launched or resumed because of the remote notification. The respective delegate methods will be invoked first. Note that this behavior is in contrast to application:didReceiveRemoteNotification:, which is not called in those cases, and which will not be invoked if this method is implemented. !
-
applicationDidRegisterForRemoteNotificationsWithDeviceToken
default void applicationDidRegisterForRemoteNotificationsWithDeviceToken(UIApplication application, NSData deviceToken)
-
applicationDidRegisterUserNotificationSettings
default void applicationDidRegisterUserNotificationSettings(UIApplication application, UIUserNotificationSettings notificationSettings)
This callback will be made upon calling -[UIApplication registerUserNotificationSettings:]. The settings the user has granted to the application will be passed in as the second argument.
-
applicationDidUpdateUserActivity
default void applicationDidUpdateUserActivity(UIApplication application, NSUserActivity userActivity)
This is called on the main thread when a user activity managed by UIKit has been updated. You can use this as a last chance to add additional data to the userActivity.
-
applicationHandleActionWithIdentifierForLocalNotificationCompletionHandler
default void applicationHandleActionWithIdentifierForLocalNotificationCompletionHandler(UIApplication application, java.lang.String identifier, UILocalNotification notification, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForLocalNotificationCompletionHandler completionHandler)
Called when your app has been activated by the user selecting an action from a local notification. A nil action identifier indicates the default action. You should call the completion handler as soon as you've finished handling the action.
-
applicationHandleActionWithIdentifierForLocalNotificationWithResponseInfoCompletionHandler
default void applicationHandleActionWithIdentifierForLocalNotificationWithResponseInfoCompletionHandler(UIApplication application, java.lang.String identifier, UILocalNotification notification, NSDictionary<?,?> responseInfo, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForLocalNotificationWithResponseInfoCompletionHandler completionHandler)
-
applicationHandleActionWithIdentifierForRemoteNotificationCompletionHandler
default void applicationHandleActionWithIdentifierForRemoteNotificationCompletionHandler(UIApplication application, java.lang.String identifier, NSDictionary<?,?> userInfo, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForRemoteNotificationCompletionHandler completionHandler)
Called when your app has been activated by the user selecting an action from a remote notification. A nil action identifier indicates the default action. You should call the completion handler as soon as you've finished handling the action.
-
applicationHandleActionWithIdentifierForRemoteNotificationWithResponseInfoCompletionHandler
default void applicationHandleActionWithIdentifierForRemoteNotificationWithResponseInfoCompletionHandler(UIApplication application, java.lang.String identifier, NSDictionary<?,?> userInfo, NSDictionary<?,?> responseInfo, UIApplicationDelegate.Block_applicationHandleActionWithIdentifierForRemoteNotificationWithResponseInfoCompletionHandler completionHandler)
-
applicationHandleEventsForBackgroundURLSessionCompletionHandler
default void applicationHandleEventsForBackgroundURLSessionCompletionHandler(UIApplication application, java.lang.String identifier, UIApplicationDelegate.Block_applicationHandleEventsForBackgroundURLSessionCompletionHandler completionHandler)
Applications using an NSURLSession with a background configuration may be launched or resumed in the background in order to handle the completion of tasks in that session, or to handle authentication. This method will be called with the identifier of the session needing attention. Once a session has been created from a configuration object with that identifier, the session's delegate will begin receiving callbacks. If such a session has already been created (if the app is being resumed, for instance), then the delegate will start receiving callbacks without any action by the application. You should call the completionHandler as soon as you're finished handling the callbacks.
-
applicationHandleOpenURL
@Deprecated default boolean applicationHandleOpenURL(UIApplication application, NSURL url)
Deprecated.
-
applicationHandleWatchKitExtensionRequestReply
default void applicationHandleWatchKitExtensionRequestReply(UIApplication application, NSDictionary<?,?> userInfo, UIApplicationDelegate.Block_applicationHandleWatchKitExtensionRequestReply reply)
-
applicationOpenURLOptions
default boolean applicationOpenURLOptions(UIApplication app, NSURL url, NSDictionary<java.lang.String,?> options)
no equiv. notification. return NO if the application can't open for some reason
-
applicationOpenURLSourceApplicationAnnotation
@Deprecated default boolean applicationOpenURLSourceApplicationAnnotation(UIApplication application, NSURL url, java.lang.String sourceApplication, java.lang.Object annotation)
Deprecated.
-
applicationPerformActionForShortcutItemCompletionHandler
default void applicationPerformActionForShortcutItemCompletionHandler(UIApplication application, UIApplicationShortcutItem shortcutItem, UIApplicationDelegate.Block_applicationPerformActionForShortcutItemCompletionHandler completionHandler)
Called when the user activates your application by selecting a shortcut on the home screen, except when -application:willFinishLaunchingWithOptions: or -application:didFinishLaunchingWithOptions returns NO.
-
applicationPerformFetchWithCompletionHandler
default void applicationPerformFetchWithCompletionHandler(UIApplication application, UIApplicationDelegate.Block_applicationPerformFetchWithCompletionHandler completionHandler)
Applications with the "fetch" background mode may be given opportunities to fetch updated content in the background or when it is convenient for the system. This method will be called in these situations. You should call the fetchCompletionHandler as soon as you're finished performing that operation, so the system can accurately estimate its power and data cost.
-
applicationShouldAllowExtensionPointIdentifier
default boolean applicationShouldAllowExtensionPointIdentifier(UIApplication application, java.lang.String extensionPointIdentifier)
Applications may reject specific types of extensions based on the extension point identifier. Constants representing common extension point identifiers are provided further down. If unimplemented, the default behavior is to allow the extension point identifier.
-
applicationShouldRestoreApplicationState
default boolean applicationShouldRestoreApplicationState(UIApplication application, NSCoder coder)
-
applicationShouldSaveApplicationState
default boolean applicationShouldSaveApplicationState(UIApplication application, NSCoder coder)
Deprecated State Restoration opt-in methods:
-
applicationSupportedInterfaceOrientationsForWindow
default long applicationSupportedInterfaceOrientationsForWindow(UIApplication application, UIWindow window)
-
applicationUserDidAcceptCloudKitShareWithMetadata
default void applicationUserDidAcceptCloudKitShareWithMetadata(UIApplication application, CKShareMetadata cloudKitShareMetadata)
This will be called on the main thread after the user indicates they want to accept a CloudKit sharing invitation in your application. You should use the CKShareMetadata object's shareURL and containerIdentifier to schedule a CKAcceptSharesOperation, then start using the resulting CKShare and its associated record(s), which will appear in the CKContainer's shared database in a zone matching that of the record's owner.
-
applicationViewControllerWithRestorationIdentifierPathCoder
default UIViewController applicationViewControllerWithRestorationIdentifierPathCoder(UIApplication application, NSArray<java.lang.String> identifierComponents, NSCoder coder)
-
applicationWillChangeStatusBarFrame
default void applicationWillChangeStatusBarFrame(UIApplication application, CGRect newStatusBarFrame)
in screen coordinates
-
applicationWillChangeStatusBarOrientationDuration
default void applicationWillChangeStatusBarOrientationDuration(UIApplication application, long newStatusBarOrientation, double duration)
-
applicationWillContinueUserActivityWithType
default boolean applicationWillContinueUserActivityWithType(UIApplication application, java.lang.String userActivityType)
Called on the main thread as soon as the user indicates they want to continue an activity in your application. The NSUserActivity object may not be available instantly, so use this as an opportunity to show the user that an activity will be continued shortly. For each application:willContinueUserActivityWithType: invocation, you are guaranteed to get exactly one invocation of application:continueUserActivity: on success, or application:didFailToContinueUserActivityWithType:error: if an error was encountered.
-
applicationWillEncodeRestorableStateWithCoder
default void applicationWillEncodeRestorableStateWithCoder(UIApplication application, NSCoder coder)
-
applicationWillFinishLaunchingWithOptions
default boolean applicationWillFinishLaunchingWithOptions(UIApplication application, NSDictionary<java.lang.String,?> launchOptions)
-
applicationDidBecomeActive
default void applicationDidBecomeActive(UIApplication application)
-
applicationDidEnterBackground
default void applicationDidEnterBackground(UIApplication application)
-
applicationDidFinishLaunching
default void applicationDidFinishLaunching(UIApplication application)
-
applicationDidReceiveMemoryWarning
default void applicationDidReceiveMemoryWarning(UIApplication application)
try to clean up as much memory as possible. next step is to terminate app
-
applicationProtectedDataDidBecomeAvailable
default void applicationProtectedDataDidBecomeAvailable(UIApplication application)
-
applicationProtectedDataWillBecomeUnavailable
default void applicationProtectedDataWillBecomeUnavailable(UIApplication application)
-
applicationShouldRequestHealthAuthorization
default void applicationShouldRequestHealthAuthorization(UIApplication application)
-
applicationSignificantTimeChange
default void applicationSignificantTimeChange(UIApplication application)
midnight, carrier time update, daylight savings time change
-
applicationWillEnterForeground
default void applicationWillEnterForeground(UIApplication application)
-
applicationWillResignActive
default void applicationWillResignActive(UIApplication application)
-
applicationWillTerminate
default void applicationWillTerminate(UIApplication application)
-
setWindow
default void setWindow(UIWindow value)
-
window
default UIWindow window()
-
applicationHandleIntentCompletionHandler
default void applicationHandleIntentCompletionHandler(UIApplication application, INIntent intent, UIApplicationDelegate.Block_applicationHandleIntentCompletionHandler completionHandler)
-
applicationConfigurationForConnectingSceneSessionOptions
default UISceneConfiguration applicationConfigurationForConnectingSceneSessionOptions(UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options)
Called when the UIKit is about to create & vend a new UIScene instance to the application. The application delegate may modify the provided UISceneConfiguration within this method. If the UISceneConfiguration instance returned from this method does not have a systemType which matches the connectingSession's, UIKit will assert
-
applicationDidDiscardSceneSessions
default void applicationDidDiscardSceneSessions(UIApplication application, NSSet<? extends UISceneSession> sceneSessions)
Called when the system, due to a user interaction or a request from the application itself, removes one or more representation from the -[UIApplication openSessions] set If sessions are discarded while the application is not running, this method is called shortly after the applications next launch.
-
applicationShouldRestoreSecureApplicationState
default boolean applicationShouldRestoreSecureApplicationState(UIApplication application, NSCoder coder)
-
applicationShouldSaveSecureApplicationState
default boolean applicationShouldSaveSecureApplicationState(UIApplication application, NSCoder coder)
-
applicationHandlerForIntent
default java.lang.Object applicationHandlerForIntent(UIApplication application, INIntent intent)
-
-