Trait objc2_ui_kit::UIApplicationDelegate

source ·
pub unsafe trait UIApplicationDelegate: NSObjectProtocol + IsMainThreadOnly {
Show 53 methods // Provided methods unsafe 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 { ... } unsafe fn applicationDidBecomeActive(&self, application: &UIApplication) where Self: Sized + Message { ... } unsafe fn applicationWillResignActive(&self, application: &UIApplication) where Self: Sized + Message { ... } unsafe 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 { ... } unsafe fn applicationDidReceiveMemoryWarning( &self, application: &UIApplication ) where Self: Sized + Message { ... } unsafe fn applicationWillTerminate(&self, application: &UIApplication) where Self: Sized + Message { ... } unsafe fn applicationSignificantTimeChange( &self, application: &UIApplication ) where Self: Sized + Message { ... } unsafe fn application_willChangeStatusBarOrientation_duration( &self, application: &UIApplication, new_status_bar_orientation: UIInterfaceOrientation, duration: NSTimeInterval ) where Self: Sized + Message { ... } unsafe fn application_didChangeStatusBarOrientation( &self, application: &UIApplication, old_status_bar_orientation: UIInterfaceOrientation ) where Self: Sized + Message { ... } unsafe fn application_willChangeStatusBarFrame( &self, application: &UIApplication, new_status_bar_frame: CGRect ) where Self: Sized + Message { ... } unsafe fn application_didChangeStatusBarFrame( &self, application: &UIApplication, old_status_bar_frame: CGRect ) where Self: Sized + Message { ... } unsafe fn application_didRegisterUserNotificationSettings( &self, application: &UIApplication, notification_settings: &UIUserNotificationSettings ) where Self: Sized + Message { ... } unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &UIApplication, device_token: &NSData ) where Self: Sized + Message { ... } unsafe 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 { ... } unsafe fn application_didReceiveLocalNotification( &self, application: &UIApplication, notification: &UILocalNotification ) where Self: Sized + Message { ... } unsafe fn application_handleActionWithIdentifier_forLocalNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, completion_handler: &Block<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: &Block<dyn Fn()> ) where Self: Sized + Message { ... } unsafe fn application_handleActionWithIdentifier_forRemoteNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, completion_handler: &Block<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: &Block<dyn Fn()> ) where Self: Sized + Message { ... } unsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler( &self, application: &UIApplication, user_info: &NSDictionary, completion_handler: &Block<dyn Fn(UIBackgroundFetchResult)> ) where Self: Sized + Message { ... } unsafe fn application_performFetchWithCompletionHandler( &self, application: &UIApplication, completion_handler: &Block<dyn Fn(UIBackgroundFetchResult)> ) where Self: Sized + Message { ... } unsafe fn application_performActionForShortcutItem_completionHandler( &self, application: &UIApplication, shortcut_item: &UIApplicationShortcutItem, completion_handler: &Block<dyn Fn(Bool)> ) where Self: Sized + Message { ... } unsafe fn application_handleEventsForBackgroundURLSession_completionHandler( &self, application: &UIApplication, identifier: &NSString, completion_handler: &Block<dyn Fn()> ) where Self: Sized + Message { ... } unsafe fn application_handleWatchKitExtensionRequest_reply( &self, application: &UIApplication, user_info: Option<&NSDictionary>, reply: &Block<dyn Fn(*mut NSDictionary)> ) where Self: Sized + Message { ... } unsafe fn applicationShouldRequestHealthAuthorization( &self, application: &UIApplication ) where Self: Sized + Message { ... } unsafe fn applicationDidEnterBackground(&self, application: &UIApplication) where Self: Sized + Message { ... } unsafe fn applicationWillEnterForeground(&self, application: &UIApplication) where Self: Sized + Message { ... } unsafe fn applicationProtectedDataWillBecomeUnavailable( &self, application: &UIApplication ) where Self: Sized + Message { ... } unsafe fn applicationProtectedDataDidBecomeAvailable( &self, application: &UIApplication ) where Self: Sized + Message { ... } unsafe fn window(&self) -> Option<Retained<UIWindow>> where Self: Sized + Message { ... } unsafe fn setWindow(&self, window: Option<&UIWindow>) where Self: Sized + Message { ... } unsafe fn application_supportedInterfaceOrientationsForWindow( &self, application: &UIApplication, window: Option<&UIWindow> ) -> UIInterfaceOrientationMask where Self: Sized + Message { ... } unsafe 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 { ... } unsafe fn application_willContinueUserActivityWithType( &self, application: &UIApplication, user_activity_type: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn application_continueUserActivity_restorationHandler( &self, application: &UIApplication, user_activity: &NSUserActivity, restoration_handler: &Block<dyn Fn(*mut NSArray<ProtocolObject<dyn UIUserActivityRestoring>>)> ) -> bool where Self: Sized + Message { ... } unsafe fn application_didFailToContinueUserActivityWithType_error( &self, application: &UIApplication, user_activity_type: &NSString, error: &NSError ) where Self: Sized + Message { ... } unsafe fn application_didUpdateUserActivity( &self, application: &UIApplication, user_activity: &NSUserActivity ) where Self: Sized + Message { ... } unsafe fn application_userDidAcceptCloudKitShareWithMetadata( &self, application: &UIApplication, cloud_kit_share_metadata: &CKShareMetadata ) where Self: Sized + Message { ... } unsafe fn application_configurationForConnectingSceneSession_options( &self, application: &UIApplication, connecting_scene_session: &UISceneSession, options: &UISceneConnectionOptions ) -> Retained<UISceneConfiguration> where Self: Sized + Message { ... } unsafe fn application_didDiscardSceneSessions( &self, application: &UIApplication, scene_sessions: &NSSet<UISceneSession> ) where Self: Sized + Message { ... } unsafe fn applicationShouldAutomaticallyLocalizeKeyCommands( &self, application: &UIApplication ) -> bool where Self: Sized + Message { ... }
}
Available on crate feature UIApplication only.

Provided Methods§

source

unsafe 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.
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.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

unsafe 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.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

unsafe 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

unsafe 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

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

👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate feature UIResponder only.
source

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

👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate feature UIResponder only.
source

unsafe 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

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

Available on crate feature UIResponder only.
source

unsafe 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.
source

unsafe 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

unsafe fn application_handleActionWithIdentifier_forLocalNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, completion_handler: &Block<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: &Block<dyn Fn()> )
where Self: Sized + Message,

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

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

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

unsafe fn application_handleActionWithIdentifier_forLocalNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, response_info: &NSDictionary, completion_handler: &Block<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_didReceiveRemoteNotification_fetchCompletionHandler( &self, application: &UIApplication, user_info: &NSDictionary, completion_handler: &Block<dyn Fn(UIBackgroundFetchResult)> )
where Self: Sized + Message,

Available on crate features UIResponder and block2 only.
source

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

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

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

Available on crate features UIApplicationShortcutItem and UIResponder and block2 only.
source

unsafe fn application_handleEventsForBackgroundURLSession_completionHandler( &self, application: &UIApplication, identifier: &NSString, completion_handler: &Block<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: &Block<dyn Fn(*mut NSDictionary)> )
where Self: Sized + Message,

Available on crate features UIResponder and block2 only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

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

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

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

unsafe 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

unsafe 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.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
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.
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.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate features UIResponder and UIUserActivity and block2 only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate feature UIResponder only.
source

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

Available on crate features UIResponder and objc2-cloud-kit only.
source

unsafe 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 UISceneOptions and UISceneSession only.
source

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

Available on crate features UIResponder and UISceneSession only.
source

unsafe 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.
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§