Interface UIApplicationDelegate

    • 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.
      • 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.
      • 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.
      • 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)
      • 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)