UIApplicationDelegate

Trait UIApplicationDelegate 

Source
pub unsafe trait UIApplicationDelegate: NSObjectProtocol + MainThreadOnly {
Show 53 methods // Provided methods fn applicationDidFinishLaunching(&self, application: &UIApplication) where Self: Sized + Message { ... } unsafe fn application_willFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>>, ) -> bool where Self: Sized + Message { ... } unsafe fn application_didFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>>, ) -> bool where Self: Sized + Message { ... } fn applicationDidBecomeActive(&self, application: &UIApplication) where Self: Sized + Message { ... } fn applicationWillResignActive(&self, application: &UIApplication) where Self: Sized + Message { ... } fn applicationDidEnterBackground(&self, application: &UIApplication) where Self: Sized + Message { ... } fn applicationWillEnterForeground(&self, application: &UIApplication) where Self: Sized + Message { ... } fn application_handleOpenURL( &self, application: &UIApplication, url: &NSURL, ) -> bool where Self: Sized + Message { ... } unsafe fn application_openURL_sourceApplication_annotation( &self, application: &UIApplication, url: &NSURL, source_application: Option<&NSString>, annotation: &AnyObject, ) -> bool where Self: Sized + Message { ... } unsafe fn application_openURL_options( &self, app: &UIApplication, url: &NSURL, options: &NSDictionary<UIApplicationOpenURLOptionsKey, AnyObject>, ) -> bool where Self: Sized + Message { ... } fn applicationDidReceiveMemoryWarning(&self, application: &UIApplication) where Self: Sized + Message { ... } fn applicationWillTerminate(&self, application: &UIApplication) where Self: Sized + Message { ... } fn applicationSignificantTimeChange(&self, application: &UIApplication) where Self: Sized + Message { ... } fn application_willChangeStatusBarOrientation_duration( &self, application: &UIApplication, new_status_bar_orientation: UIInterfaceOrientation, duration: NSTimeInterval, ) where Self: Sized + Message { ... } fn application_didChangeStatusBarOrientation( &self, application: &UIApplication, old_status_bar_orientation: UIInterfaceOrientation, ) where Self: Sized + Message { ... } fn application_willChangeStatusBarFrame( &self, application: &UIApplication, new_status_bar_frame: CGRect, ) where Self: Sized + Message { ... } fn application_didChangeStatusBarFrame( &self, application: &UIApplication, old_status_bar_frame: CGRect, ) where Self: Sized + Message { ... } fn application_didRegisterUserNotificationSettings( &self, application: &UIApplication, notification_settings: &UIUserNotificationSettings, ) where Self: Sized + Message { ... } fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &UIApplication, device_token: &NSData, ) where Self: Sized + Message { ... } fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &UIApplication, error: &NSError, ) where Self: Sized + Message { ... } unsafe fn application_didReceiveRemoteNotification( &self, application: &UIApplication, user_info: &NSDictionary, ) where Self: Sized + Message { ... } fn application_didReceiveLocalNotification( &self, application: &UIApplication, notification: &UILocalNotification, ) where Self: Sized + Message { ... } fn application_handleActionWithIdentifier_forLocalNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, completion_handler: &DynBlock<dyn Fn()>, ) where Self: Sized + Message { ... } unsafe fn application_handleActionWithIdentifier_forRemoteNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, response_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, ) where Self: Sized + Message { ... } unsafe fn application_handleActionWithIdentifier_forRemoteNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, ) where Self: Sized + Message { ... } unsafe fn application_handleActionWithIdentifier_forLocalNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, response_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, ) where Self: Sized + Message { ... } unsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler( &self, application: &UIApplication, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>, ) where Self: Sized + Message { ... } fn application_performFetchWithCompletionHandler( &self, application: &UIApplication, completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>, ) where Self: Sized + Message { ... } fn application_performActionForShortcutItem_completionHandler( &self, application: &UIApplication, shortcut_item: &UIApplicationShortcutItem, completion_handler: &DynBlock<dyn Fn(Bool)>, ) where Self: Sized + Message { ... } fn application_handleEventsForBackgroundURLSession_completionHandler( &self, application: &UIApplication, identifier: &NSString, completion_handler: &DynBlock<dyn Fn()>, ) where Self: Sized + Message { ... } unsafe fn application_handleWatchKitExtensionRequest_reply( &self, application: &UIApplication, user_info: Option<&NSDictionary>, reply: &DynBlock<dyn Fn(*mut NSDictionary)>, ) where Self: Sized + Message { ... } fn applicationShouldRequestHealthAuthorization( &self, application: &UIApplication, ) where Self: Sized + Message { ... } fn applicationProtectedDataWillBecomeUnavailable( &self, application: &UIApplication, ) where Self: Sized + Message { ... } fn applicationProtectedDataDidBecomeAvailable( &self, application: &UIApplication, ) where Self: Sized + Message { ... } fn window(&self) -> Option<Retained<UIWindow>> where Self: Sized + Message { ... } fn setWindow(&self, window: Option<&UIWindow>) where Self: Sized + Message { ... } fn application_supportedInterfaceOrientationsForWindow( &self, application: &UIApplication, window: Option<&UIWindow>, ) -> UIInterfaceOrientationMask where Self: Sized + Message { ... } fn application_shouldAllowExtensionPointIdentifier( &self, application: &UIApplication, extension_point_identifier: &UIApplicationExtensionPointIdentifier, ) -> bool where Self: Sized + Message { ... } unsafe fn application_viewControllerWithRestorationIdentifierPath_coder( &self, application: &UIApplication, identifier_components: &NSArray<NSString>, coder: &NSCoder, ) -> Option<Retained<UIViewController>> where Self: Sized + Message { ... } unsafe fn application_shouldSaveSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool where Self: Sized + Message { ... } unsafe fn application_shouldRestoreSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool where Self: Sized + Message { ... } unsafe fn application_willEncodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder, ) where Self: Sized + Message { ... } unsafe fn application_didDecodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder, ) where Self: Sized + Message { ... } unsafe fn application_shouldSaveApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool where Self: Sized + Message { ... } unsafe fn application_shouldRestoreApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool where Self: Sized + Message { ... } fn application_willContinueUserActivityWithType( &self, application: &UIApplication, user_activity_type: &NSString, ) -> bool where Self: Sized + Message { ... } fn application_continueUserActivity_restorationHandler( &self, application: &UIApplication, user_activity: &NSUserActivity, restoration_handler: &DynBlock<dyn Fn(*mut NSArray<ProtocolObject<dyn UIUserActivityRestoring>>)>, ) -> bool where Self: Sized + Message { ... } fn application_didFailToContinueUserActivityWithType_error( &self, application: &UIApplication, user_activity_type: &NSString, error: &NSError, ) where Self: Sized + Message { ... } fn application_didUpdateUserActivity( &self, application: &UIApplication, user_activity: &NSUserActivity, ) where Self: Sized + Message { ... } fn application_userDidAcceptCloudKitShareWithMetadata( &self, application: &UIApplication, cloud_kit_share_metadata: &CKShareMetadata, ) where Self: Sized + Message { ... } fn application_configurationForConnectingSceneSession_options( &self, application: &UIApplication, connecting_scene_session: &UISceneSession, options: &UISceneConnectionOptions, ) -> Retained<UISceneConfiguration> where Self: Sized + Message { ... } fn application_didDiscardSceneSessions( &self, application: &UIApplication, scene_sessions: &NSSet<UISceneSession>, ) where Self: Sized + Message { ... } fn applicationShouldAutomaticallyLocalizeKeyCommands( &self, application: &UIApplication, ) -> bool where Self: Sized + Message { ... }
}
Available on crate feature UIApplication only.
Expand description

Provided Methods§

Source

fn applicationDidFinishLaunching(&self, application: &UIApplication)
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

unsafe fn application_willFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>>, ) -> bool
where Self: Sized + Message,

Available on crate feature UIResponder only.
§Safety

launch_options generic should be of the correct type.

Source

unsafe fn application_didFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>>, ) -> bool
where Self: Sized + Message,

Available on crate feature UIResponder only.
§Safety

launch_options generic should be of the correct type.

Source

fn applicationDidBecomeActive(&self, application: &UIApplication)
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and sceneDidBecomeActive(_:) from UISceneDelegate or the UIApplication.didBecomeActiveNotification instead.
Available on crate feature UIResponder only.

Tells the delegate that the application has become active

  • Note: This method is not called if UIScene lifecycle has been adopted.
Source

fn applicationWillResignActive(&self, application: &UIApplication)
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and sceneWillResignActive(_:) from UISceneDelegate or the UIApplication.willResignActiveNotification instead.
Available on crate feature UIResponder only.

Tells the delegate that the application is about to become inactive

  • Note: This method is not called if UIScene lifecycle has been adopted.
Source

fn applicationDidEnterBackground(&self, application: &UIApplication)
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and sceneDidEnterBackground(_:) from UISceneDelegate or the UIApplication.didEnterBackgroundNotification instead.
Available on crate feature UIResponder only.

Tells the delegate that the application is now in the background

  • Note: This method is not called if UIScene lifecycle has been adopted.
Source

fn applicationWillEnterForeground(&self, application: &UIApplication)
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and sceneWillEnterForeground(_:) from UISceneDelegate or the UIApplication.willEnterForegroundNotification instead.
Available on crate feature UIResponder only.

Tells the delegate that the application is about to enter the foreground

  • Note: This method is not called if UIScene lifecycle has been adopted.
Source

fn application_handleOpenURL( &self, application: &UIApplication, url: &NSURL, ) -> bool
where Self: Sized + Message,

👎Deprecated
Available on crate feature UIResponder only.
Source

unsafe fn application_openURL_sourceApplication_annotation( &self, application: &UIApplication, url: &NSURL, source_application: Option<&NSString>, annotation: &AnyObject, ) -> bool
where Self: Sized + Message,

👎Deprecated
Available on crate feature UIResponder only.
§Safety

annotation should be of the correct type.

Source

unsafe fn application_openURL_options( &self, app: &UIApplication, url: &NSURL, options: &NSDictionary<UIApplicationOpenURLOptionsKey, AnyObject>, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and scene(_:openURLContexts:) from UISceneDelegate instead.
Available on crate feature UIResponder only.

Return NO if the application can’t open the url for some reason

§Safety

options generic should be of the correct type.

Source

fn applicationDidReceiveMemoryWarning(&self, application: &UIApplication)
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn applicationWillTerminate(&self, application: &UIApplication)
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn applicationSignificantTimeChange(&self, application: &UIApplication)
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn application_willChangeStatusBarOrientation_duration( &self, application: &UIApplication, new_status_bar_orientation: UIInterfaceOrientation, duration: NSTimeInterval, )
where Self: Sized + Message,

👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate features UIOrientation and UIResponder only.
Source

fn application_didChangeStatusBarOrientation( &self, application: &UIApplication, old_status_bar_orientation: UIInterfaceOrientation, )
where Self: Sized + Message,

👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate features UIOrientation and UIResponder only.
Source

fn application_willChangeStatusBarFrame( &self, application: &UIApplication, new_status_bar_frame: CGRect, )
where Self: Sized + Message,

👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate features UIResponder and objc2-core-foundation only.
Source

fn application_didChangeStatusBarFrame( &self, application: &UIApplication, old_status_bar_frame: CGRect, )
where Self: Sized + Message,

👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate features UIResponder and objc2-core-foundation only.
Source

fn application_didRegisterUserNotificationSettings( &self, application: &UIApplication, notification_settings: &UIUserNotificationSettings, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:]
Available on crate features UIResponder and UIUserNotificationSettings only.
Source

fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &UIApplication, device_token: &NSData, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &UIApplication, error: &NSError, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

unsafe fn application_didReceiveRemoteNotification( &self, application: &UIApplication, user_info: &NSDictionary, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:] or -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:] for user visible notifications and -[UIApplicationDelegate application:didReceiveRemoteNotification:fetchCompletionHandler:] for silent remote notifications
Available on crate feature UIResponder only.
§Safety

user_info generic should be of the correct type.

Source

fn application_didReceiveLocalNotification( &self, application: &UIApplication, notification: &UILocalNotification, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:] or -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features UILocalNotification and UIResponder only.
Source

fn application_handleActionWithIdentifier_forLocalNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, completion_handler: &DynBlock<dyn Fn()>, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features UILocalNotification and UIResponder and block2 only.
Source

unsafe fn application_handleActionWithIdentifier_forRemoteNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, response_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features UIResponder and block2 only.
§Safety
  • user_info generic should be of the correct type.
  • response_info generic should be of the correct type.
Source

unsafe fn application_handleActionWithIdentifier_forRemoteNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features UIResponder and block2 only.
§Safety

user_info generic should be of the correct type.

Source

unsafe fn application_handleActionWithIdentifier_forLocalNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, response_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, )
where Self: Sized + Message,

👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features UILocalNotification and UIResponder and block2 only.
§Safety

response_info generic should be of the correct type.

Source

unsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler( &self, application: &UIApplication, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>, )
where Self: Sized + Message,

Available on crate features UIResponder and block2 only.

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. !

§Safety

user_info generic should be of the correct type.

Source

fn application_performFetchWithCompletionHandler( &self, application: &UIApplication, completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>, )
where Self: Sized + Message,

👎Deprecated: Use a BGAppRefreshTask in the BackgroundTasks framework instead
Available on crate features UIResponder and block2 only.

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.

Source

fn application_performActionForShortcutItem_completionHandler( &self, application: &UIApplication, shortcut_item: &UIApplicationShortcutItem, completion_handler: &DynBlock<dyn Fn(Bool)>, )
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and windowScene(_:performActionFor:completionHandler:) from UIWindowSceneDelegate instead.
Available on crate features UIApplicationShortcutItem and UIResponder and block2 only.

Called when the user activates your application by selecting a shortcut on the home screen, except when application(_:willFinishLaunchingWithOptions:) or application(_:didFinishLaunchingWithOptions:) returns false.

Source

fn application_handleEventsForBackgroundURLSession_completionHandler( &self, application: &UIApplication, identifier: &NSString, completion_handler: &DynBlock<dyn Fn()>, )
where Self: Sized + Message,

Available on crate features UIResponder and block2 only.
Source

unsafe fn application_handleWatchKitExtensionRequest_reply( &self, application: &UIApplication, user_info: Option<&NSDictionary>, reply: &DynBlock<dyn Fn(*mut NSDictionary)>, )
where Self: Sized + Message,

Available on crate features UIResponder and block2 only.
§Safety

user_info generic should be of the correct type.

Source

fn applicationShouldRequestHealthAuthorization( &self, application: &UIApplication, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn applicationProtectedDataWillBecomeUnavailable( &self, application: &UIApplication, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn applicationProtectedDataDidBecomeAvailable( &self, application: &UIApplication, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

fn window(&self) -> Option<Retained<UIWindow>>
where Self: Sized + Message,

Available on crate features UIResponder and UIView and UIWindow only.
Source

fn setWindow(&self, window: Option<&UIWindow>)
where Self: Sized + Message,

Available on crate features UIResponder and UIView and UIWindow only.

Setter for window.

Source

fn application_supportedInterfaceOrientationsForWindow( &self, application: &UIApplication, window: Option<&UIWindow>, ) -> UIInterfaceOrientationMask
where Self: Sized + Message,

Available on crate features UIOrientation and UIResponder and UIView and UIWindow only.
Source

fn application_shouldAllowExtensionPointIdentifier( &self, application: &UIApplication, extension_point_identifier: &UIApplicationExtensionPointIdentifier, ) -> bool
where Self: Sized + Message,

Available on crate feature UIResponder only.
Source

unsafe fn application_viewControllerWithRestorationIdentifierPath_coder( &self, application: &UIApplication, identifier_components: &NSArray<NSString>, coder: &NSCoder, ) -> Option<Retained<UIViewController>>
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
§Safety

coder possibly has further requirements.

Source

unsafe fn application_shouldSaveSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
where Self: Sized + Message,

Available on crate feature UIResponder only.
§Safety

coder possibly has further requirements.

Source

unsafe fn application_shouldRestoreSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
where Self: Sized + Message,

Available on crate feature UIResponder only.
§Safety

coder possibly has further requirements.

Source

unsafe fn application_willEncodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
§Safety

coder possibly has further requirements.

Source

unsafe fn application_didDecodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder, )
where Self: Sized + Message,

Available on crate feature UIResponder only.
§Safety

coder possibly has further requirements.

Source

unsafe fn application_shouldSaveApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use application:shouldSaveSecureApplicationState: instead
Available on crate feature UIResponder only.
§Safety

coder possibly has further requirements.

Source

unsafe fn application_shouldRestoreApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use application:shouldRestoreSecureApplicationState: instead
Available on crate feature UIResponder only.
§Safety

coder possibly has further requirements.

Source

fn application_willContinueUserActivityWithType( &self, application: &UIApplication, user_activity_type: &NSString, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and scene(_:willContinueUserActivityWithType:) from UISceneDelegate instead.
Available on crate feature UIResponder only.

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(_:continue:restorationHandler:) on success, or application(_:didFailToContinueUserActivityWithType:error:) if an error was encountered.

Source

fn application_continueUserActivity_restorationHandler( &self, application: &UIApplication, user_activity: &NSUserActivity, restoration_handler: &DynBlock<dyn Fn(*mut NSArray<ProtocolObject<dyn UIUserActivityRestoring>>)>, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and scene(_:continue:) from UISceneDelegate instead.
Available on crate features UIResponder and UIUserActivity and block2 only.

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.

Source

fn application_didFailToContinueUserActivityWithType_error( &self, application: &UIApplication, user_activity_type: &NSString, error: &NSError, )
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and scene(_:didFailToContinueUserActivityWithType:error:) from UISceneDelegate instead.
Available on crate feature UIResponder only.

If the user activity cannot be fetched after application(_:willContinueUserActivityWithType:) is called, this will be called on the main thread when implemented.

Source

fn application_didUpdateUserActivity( &self, application: &UIApplication, user_activity: &NSUserActivity, )
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and scene(_:didUpdate) from UISceneDelegate instead.
Available on crate feature UIResponder only.

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.

Source

fn application_userDidAcceptCloudKitShareWithMetadata( &self, application: &UIApplication, cloud_kit_share_metadata: &CKShareMetadata, )
where Self: Sized + Message,

👎Deprecated: Use UIScene lifecycle and windowScene(_:userDidAcceptCloudKitShareWith:) from UIWindowSceneDelegate instead.
Available on crate features UIResponder and objc2-cloud-kit only.

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.

Source

fn application_configurationForConnectingSceneSession_options( &self, application: &UIApplication, connecting_scene_session: &UISceneSession, options: &UISceneConnectionOptions, ) -> Retained<UISceneConfiguration>
where Self: Sized + Message,

Available on crate features UIResponder and UISceneConfiguration and UISceneOptions and UISceneSession only.
Source

fn application_didDiscardSceneSessions( &self, application: &UIApplication, scene_sessions: &NSSet<UISceneSession>, )
where Self: Sized + Message,

Available on crate features UIResponder and UISceneSession only.
Source

fn applicationShouldAutomaticallyLocalizeKeyCommands( &self, application: &UIApplication, ) -> bool
where Self: Sized + Message,

Available on crate feature UIResponder only.

Trait Implementations§

Source§

impl ProtocolType for dyn UIApplicationDelegate

Source§

const NAME: &'static str = "UIApplicationDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UIApplicationDelegate

Implementations on Foreign Types§

Source§

impl<T> UIApplicationDelegate for ProtocolObject<T>

Implementors§