Package apple.uikit

Class UIApplication

    • Constructor Detail

      • UIApplication

        protected UIApplication​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static UIApplication allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(@NotNull
                                                           @NotNull java.lang.String identifier)
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • registerObjectForStateRestorationRestorationIdentifier

        public static void registerObjectForStateRestorationRestorationIdentifier​(@NotNull
                                                                                  @NotNull UIStateRestoring object,
                                                                                  @NotNull
                                                                                  @NotNull java.lang.String restorationIdentifier)
        Register non-View/ViewController objects for state restoration so other objects can reference them within state restoration archives. If the object implements encode/decode, those methods will be called during save/restore. Obj and identifier must not be nil, or will raise UIRestorationObjectRegistrationException. Objects do not need to be unregistered when they are deleted, the State Restoration system will notice and stop tracking the object. API-Since: 7.0
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • sharedApplication

        @NotNull
        public static @NotNull UIApplication sharedApplication()
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • applicationIconBadgeNumber

        @Deprecated
        public long applicationIconBadgeNumber()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 17.0 Deprecated-Message: Use -[UNUserNotificationCenter setBadgeCount:withCompletionHandler:] instead.
      • applicationState

        public long applicationState()
        API-Since: 4.0
      • applicationSupportsShakeToEdit

        public boolean applicationSupportsShakeToEdit()
        API-Since: 3.0
      • backgroundRefreshStatus

        public long backgroundRefreshStatus()
        When background refresh is available for an application, it may launched or resumed in the background to handle significant location changes, remote notifications, background fetches, etc. Observe UIApplicationBackgroundRefreshStatusDidChangeNotification to be notified of changes. API-Since: 7.0
      • backgroundTimeRemaining

        public double backgroundTimeRemaining()
        API-Since: 4.0
      • beginIgnoringInteractionEvents

        @Deprecated
        public void beginIgnoringInteractionEvents()
        Deprecated.
        nested. set should be set during animations & transitions to ignore touch and other events API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use UIView's userInteractionEnabled property instead
      • beginReceivingRemoteControlEvents

        public void beginReceivingRemoteControlEvents()
        API-Since: 4.0
      • canOpenURL

        public boolean canOpenURL​(@NotNull
                                  @NotNull NSURL url)
        API-Since: 3.0
      • cancelAllLocalNotifications

        @Deprecated
        public void cancelAllLocalNotifications()
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter removeAllPendingNotificationRequests]
      • cancelLocalNotification

        @Deprecated
        public void cancelLocalNotification​(@NotNull
                                            @NotNull UILocalNotification notification)
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter removePendingNotificationRequestsWithIdentifiers:]
      • clearKeepAliveTimeout

        @Deprecated
        public void clearKeepAliveTimeout()
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 9.0 Deprecated-Message: Please use PushKit for VoIP applications instead of calling this method
      • completeStateRestoration

        public void completeStateRestoration()
        API-Since: 6.0
      • currentUserNotificationSettings

        @Nullable
        @Deprecated
        public @Nullable UIUserNotificationSettings currentUserNotificationSettings()
        Deprecated.
        Returns the enabled user notification settings, also taking into account any systemwide settings. API-Since: 8.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:]
      • enabledRemoteNotificationTypes

        @Deprecated
        public long enabledRemoteNotificationTypes()
        Deprecated.
        Returns the enabled types, also taking into account any systemwide settings; doesn't relate to connectivity. API-Since: 3.0 Deprecated-Since: 8.0 Deprecated-Message: Use -[UIApplication isRegisteredForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] to retrieve user-enabled remote notification and user notification settings
      • endBackgroundTask

        public void endBackgroundTask​(long identifier)
        API-Since: 4.0
      • endIgnoringInteractionEvents

        @Deprecated
        public void endIgnoringInteractionEvents()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use UIView's userInteractionEnabled property instead
      • endReceivingRemoteControlEvents

        public void endReceivingRemoteControlEvents()
        API-Since: 4.0
      • extendStateRestoration

        public void extendStateRestoration()
        These methods are used to inform the system that state restoration is occurring asynchronously after the application has processed its restoration archive on launch. In the even of a crash, the system will be able to detect that it may have been caused by a bad restoration archive and arrange to ignore it on a subsequent application launch. API-Since: 6.0
      • ignoreSnapshotOnNextApplicationLaunch

        public void ignoreSnapshotOnNextApplicationLaunch()
        Indicate the application should not use the snapshot on next launch, even if there is a valid state restoration archive. This should only be called from methods invoked from State Preservation, else it is ignored. API-Since: 7.0
      • isIdleTimerDisabled

        public boolean isIdleTimerDisabled()
        default is NO
      • setIdleTimerDisabled

        public void setIdleTimerDisabled​(boolean value)
        default is NO
      • isIgnoringInteractionEvents

        @Deprecated
        public boolean isIgnoringInteractionEvents()
        Deprecated.
        returns YES if we are at least one deep in ignoring events API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use UIView's userInteractionEnabled property instead
      • isNetworkActivityIndicatorVisible

        @Deprecated
        public boolean isNetworkActivityIndicatorVisible()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Provide a custom network activity UI in your app if desired.
      • setNetworkActivityIndicatorVisible

        @Deprecated
        public void setNetworkActivityIndicatorVisible​(boolean value)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Provide a custom network activity UI in your app if desired.
      • isProtectedDataAvailable

        public boolean isProtectedDataAvailable()
        API-Since: 4.0
      • isProximitySensingEnabled

        @Deprecated
        public boolean isProximitySensingEnabled()
        Deprecated.
        default is NO. see UIDevice for replacement API-Since: 2.0 Deprecated-Since: 3.0
      • setProximitySensingEnabled

        @Deprecated
        public void setProximitySensingEnabled​(boolean value)
        Deprecated.
        default is NO. see UIDevice for replacement API-Since: 2.0 Deprecated-Since: 3.0
      • isRegisteredForRemoteNotifications

        public boolean isRegisteredForRemoteNotifications()
        Returns YES if the application is currently registered for remote notifications, taking into account any systemwide settings; doesn't relate to connectivity. API-Since: 8.0
      • isStatusBarHidden

        @Deprecated
        public boolean isStatusBarHidden()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use the statusBarManager property of the window scene instead.
      • setStatusBarHidden

        @Deprecated
        public void setStatusBarHidden​(boolean value)
        Deprecated.
        Setting statusBarHidden does nothing if your application is using the default UIViewController-based status bar system. API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Use -[UIViewController prefersStatusBarHidden]
      • keyWindow

        @Nullable
        @Deprecated
        public @Nullable UIWindow keyWindow()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
      • openURL

        @Deprecated
        public boolean openURL​(@NotNull
                               @NotNull NSURL url)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 10.0
      • openURLOptionsCompletionHandler

        public void openURLOptionsCompletionHandler​(@NotNull
                                                    @NotNull NSURL url,
                                                    @NotNull
                                                    @NotNull NSDictionary<java.lang.String,​?> options,
                                                    @Nullable
                                                    @Nullable UIApplication.Block_openURLOptionsCompletionHandler completion)
        Options are specified in the section below for openURL options. An empty options dictionary will result in the same behavior as the older openURL call, aside from the fact that this is asynchronous and calls the completion handler rather than returning a result. The completion handler is called on the main queue. API-Since: 10.0
      • preferredContentSizeCategory

        @NotNull
        public @NotNull java.lang.String preferredContentSizeCategory()
        Return the size category API-Since: 7.0
      • presentLocalNotificationNow

        @Deprecated
        public void presentLocalNotificationNow​(@NotNull
                                                @NotNull UILocalNotification notification)
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter addNotificationRequest:withCompletionHandler:]
      • registerForRemoteNotificationTypes

        @Deprecated
        public void registerForRemoteNotificationTypes​(long types)
        Deprecated.
        API-Since: 3.0 Deprecated-Since: 8.0 Deprecated-Message: Use -[UIApplication registerForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:]
      • registerForRemoteNotifications

        public void registerForRemoteNotifications()
        Calling this will result in either application:didRegisterForRemoteNotificationsWithDeviceToken: or application:didFailToRegisterForRemoteNotificationsWithError: to be called on the application delegate. Note: these callbacks will be made only if the application has successfully registered for user notifications with registerUserNotificationSettings:, or if it is enabled for Background App Refresh. API-Since: 8.0
      • registerUserNotificationSettings

        @Deprecated
        public void registerUserNotificationSettings​(@NotNull
                                                     @NotNull UIUserNotificationSettings notificationSettings)
        Deprecated.
        Registering UIUserNotificationSettings more than once results in previous settings being overwritten. API-Since: 8.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]
      • scheduleLocalNotification

        @Deprecated
        public void scheduleLocalNotification​(@NotNull
                                              @NotNull UILocalNotification notification)
        Deprecated.
        copies notification API-Since: 4.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter addNotificationRequest:withCompletionHandler:]
      • scheduledLocalNotifications

        @Nullable
        @Deprecated
        public @Nullable NSArray<? extends UILocalNotification> scheduledLocalNotifications()
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter getPendingNotificationRequestsWithCompletionHandler:]
      • sendActionToFromForEvent

        public boolean sendActionToFromForEvent​(@NotNull
                                                @NotNull org.moe.natj.objc.SEL action,
                                                @Nullable
                                                @Nullable java.lang.Object target,
                                                @Nullable
                                                @Nullable java.lang.Object sender,
                                                @Nullable
                                                @Nullable UIEvent event)
      • sendEvent

        public void sendEvent​(@NotNull
                              @NotNull UIEvent event)
      • setApplicationIconBadgeNumber

        @Deprecated
        public void setApplicationIconBadgeNumber​(long value)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 17.0 Deprecated-Message: Use -[UNUserNotificationCenter setBadgeCount:withCompletionHandler:] instead.
      • setApplicationSupportsShakeToEdit

        public void setApplicationSupportsShakeToEdit​(boolean value)
        API-Since: 3.0
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable UIApplicationDelegate value)
      • setKeepAliveTimeoutHandler

        @Deprecated
        public boolean setKeepAliveTimeoutHandler​(double timeout,
                                                  @Nullable
                                                  @Nullable UIApplication.Block_setKeepAliveTimeoutHandler keepAliveHandler)
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 9.0 Deprecated-Message: Please use PushKit for VoIP applications instead of calling this method
      • setMinimumBackgroundFetchInterval

        @Deprecated
        public void setMinimumBackgroundFetchInterval​(double minimumBackgroundFetchInterval)
        Deprecated.
        The system guarantees that it will not wake up your application for a background fetch more frequently than the interval provided. Set to UIApplicationBackgroundFetchIntervalMinimum to be woken as frequently as the system desires, or to UIApplicationBackgroundFetchIntervalNever (the default) to never be woken for a background fetch. This setter will have no effect unless your application has the "fetch" UIBackgroundMode. See the UIApplicationDelegate method `application:performFetchWithCompletionHandler:` for more. API-Since: 7.0 Deprecated-Since: 13.0 Deprecated-Message: Use a BGAppRefreshTask in the BackgroundTasks framework instead
      • setNewsstandIconImage

        @Deprecated
        public void setNewsstandIconImage​(@Nullable
                                          @Nullable UIImage image)
        Deprecated.
        API-Since: 5.0 Deprecated-Since: 9.0 Deprecated-Message: Newsstand apps now behave like normal apps on SpringBoard
      • setScheduledLocalNotifications

        @Deprecated
        public void setScheduledLocalNotifications​(@Nullable
                                                   @Nullable NSArray<? extends UILocalNotification> value)
        Deprecated.
        API-Since: 4.0 Deprecated-Since: 10.0 Deprecated-Message: Use UserNotifications Framework's -[UNUserNotificationCenter getPendingNotificationRequestsWithCompletionHandler:]
      • setShortcutItems

        public void setShortcutItems​(@Nullable
                                     @Nullable NSArray<? extends UIApplicationShortcutItem> value)
        Register shortcuts to display on the home screen, or retrieve currently registered shortcuts. API-Since: 9.0
      • setStatusBarHiddenAnimated

        @Deprecated
        public void setStatusBarHiddenAnimated​(boolean hidden,
                                               boolean animated)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 3.2 Deprecated-Message: Use -[UIViewController prefersStatusBarHidden]
      • setStatusBarHiddenWithAnimation

        @Deprecated
        public void setStatusBarHiddenWithAnimation​(boolean hidden,
                                                    long animation)
        Deprecated.
        API-Since: 3.2 Deprecated-Since: 9.0 Deprecated-Message: Use -[UIViewController prefersStatusBarHidden]
      • setStatusBarOrientation

        @Deprecated
        public void setStatusBarOrientation​(long value)
        Deprecated.
        Explicit setting of the status bar orientation is more limited in iOS 6.0 and later. API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Explicit setting of the status bar orientation is more limited in iOS 6.0 and later
      • setStatusBarOrientationAnimated

        @Deprecated
        public void setStatusBarOrientationAnimated​(long interfaceOrientation,
                                                    boolean animated)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Explicit setting of the status bar orientation is more limited in iOS 6.0 and later
      • setStatusBarStyle

        @Deprecated
        public void setStatusBarStyle​(long value)
        Deprecated.
        Setting the statusBarStyle does nothing if your application is using the default UIViewController-based status bar system. API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Use -[UIViewController preferredStatusBarStyle]
      • setStatusBarStyleAnimated

        @Deprecated
        public void setStatusBarStyleAnimated​(long statusBarStyle,
                                              boolean animated)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Use -[UIViewController preferredStatusBarStyle]
      • shortcutItems

        @Nullable
        public @Nullable NSArray<? extends UIApplicationShortcutItem> shortcutItems()
        Register shortcuts to display on the home screen, or retrieve currently registered shortcuts. API-Since: 9.0
      • statusBarFrame

        @Deprecated
        public CGRect statusBarFrame()
        Deprecated.
        returns CGRectZero if the status bar is hidden API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use the statusBarManager property of the window scene instead.
      • statusBarOrientation

        @Deprecated
        public long statusBarOrientation()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use the interfaceOrientation property of the window scene instead.
      • statusBarOrientationAnimationDuration

        @Deprecated
        public double statusBarOrientationAnimationDuration()
        Deprecated.
        Returns the animation duration for the status bar during a 90 degree orientation change. It should be doubled for a 180 degree orientation change. API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
      • statusBarStyle

        @Deprecated
        public long statusBarStyle()
        Deprecated.
        default is UIStatusBarStyleDefault API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: Use the statusBarManager property of the window scene instead.
      • supportedInterfaceOrientationsForWindow

        public long supportedInterfaceOrientationsForWindow​(@Nullable
                                                            @Nullable UIWindow window)
        The system only calls this method if the application delegate has not implemented the delegate equivalent. It returns the orientations specified by the application's info.plist. If no supported interface orientations were specified it will return UIInterfaceOrientationMaskAll on an iPad and UIInterfaceOrientationMaskAllButUpsideDown on a phone. The return value should be one of the UIInterfaceOrientationMask values which indicates the orientations supported by this application. API-Since: 6.0
      • unregisterForRemoteNotifications

        public void unregisterForRemoteNotifications()
        API-Since: 3.0
      • userInterfaceLayoutDirection

        public long userInterfaceLayoutDirection()
        API-Since: 5.0
      • windows

        @NotNull
        @Deprecated
        public @NotNull NSArray<? extends UIWindow> windows()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 15.0 Deprecated-Message: Use UIWindowScene.windows on a relevant window scene instead
      • alternateIconName

        @Nullable
        public @Nullable java.lang.String alternateIconName()
        If `nil`, the primary application icon is being used. API-Since: 10.3
      • setAlternateIconNameCompletionHandler

        public void setAlternateIconNameCompletionHandler​(@Nullable
                                                          @Nullable java.lang.String alternateIconName,
                                                          @Nullable
                                                          @Nullable UIApplication.Block_setAlternateIconNameCompletionHandler completionHandler)
        Pass `nil` to use the primary application icon. The completion handler will be invoked asynchronously on an arbitrary background queue; be sure to dispatch back to the main queue before doing any further UI work. API-Since: 10.3
      • supportsAlternateIcons

        public boolean supportsAlternateIcons()
        If false, alternate icons are not supported for the current process. API-Since: 10.3
      • connectedScenes

        @NotNull
        public @NotNull NSSet<? extends UIScene> connectedScenes()
        All of the currently connected UIScene instances API-Since: 13.0
      • openSessions

        @NotNull
        public @NotNull NSSet<? extends UISceneSession> openSessions()
        All of the representations that currently have connected UIScene instances or had their sessions persisted by the system (ex: visible in iOS' switcher) API-Since: 13.0
      • requestSceneSessionRefresh

        public void requestSceneSessionRefresh​(@NotNull
                                               @NotNull UISceneSession sceneSession)
        requests that any system UI representing a scene be updated due to background updates or any other relevant model/state update. API-Since: 13.0
      • supportsMultipleScenes

        public boolean supportsMultipleScenes()
        returns YES if the application both declares multiple scene support in its info.plist and the executing environment allows multiple scenes for at least one system type. NO otherwise. API-Since: 13.0
      • activateSceneSessionForRequestErrorHandler

        public void activateSceneSessionForRequestErrorHandler​(@NotNull
                                                               @NotNull UISceneSessionActivationRequest request,
                                                               @Nullable
                                                               @Nullable UIApplication.Block_activateSceneSessionForRequestErrorHandler errorHandler)
        Asks the system to activate an existing scene, or create a new scene and associate it with your app. - Parameters: - request: The activation request. - errorHandler: A handler to be called if the request fails. API-Since: 17.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.