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§
unsafe fn applicationDidFinishLaunching(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn application_willFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>> ) -> bool
Available on crate feature
UIResponder only.unsafe fn application_didFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>> ) -> bool
Available on crate feature
UIResponder only.unsafe fn applicationDidBecomeActive(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn applicationWillResignActive(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn application_handleOpenURL( &self, application: &UIApplication, url: &NSURL ) -> bool
👎Deprecated
Available on crate feature
UIResponder only.unsafe fn application_openURL_sourceApplication_annotation( &self, application: &UIApplication, url: &NSURL, source_application: Option<&NSString>, annotation: &AnyObject ) -> bool
👎Deprecated
Available on crate feature
UIResponder only.unsafe fn application_openURL_options( &self, app: &UIApplication, url: &NSURL, options: &NSDictionary<UIApplicationOpenURLOptionsKey, AnyObject> ) -> bool
Available on crate feature
UIResponder only.unsafe fn applicationDidReceiveMemoryWarning(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn applicationWillTerminate(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn applicationSignificantTimeChange(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn application_willChangeStatusBarOrientation_duration( &self, application: &UIApplication, new_status_bar_orientation: UIInterfaceOrientation, duration: NSTimeInterval )
👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate features
UIOrientation and UIResponder only.unsafe fn application_didChangeStatusBarOrientation( &self, application: &UIApplication, old_status_bar_orientation: UIInterfaceOrientation )
👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate features
UIOrientation and UIResponder only.unsafe fn application_willChangeStatusBarFrame( &self, application: &UIApplication, new_status_bar_frame: CGRect )
👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate feature
UIResponder only.unsafe fn application_didChangeStatusBarFrame( &self, application: &UIApplication, old_status_bar_frame: CGRect )
👎Deprecated: Use viewWillTransitionToSize:withTransitionCoordinator: instead.
Available on crate feature
UIResponder only.unsafe fn application_didRegisterUserNotificationSettings( &self, application: &UIApplication, notification_settings: &UIUserNotificationSettings )
👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:]
Available on crate features
UIResponder and UIUserNotificationSettings only.unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &UIApplication, device_token: &NSData )
Available on crate feature
UIResponder only.unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &UIApplication, error: &NSError )
Available on crate feature
UIResponder only.unsafe fn application_didReceiveRemoteNotification( &self, application: &UIApplication, user_info: &NSDictionary )
👎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.unsafe fn application_didReceiveLocalNotification( &self, application: &UIApplication, notification: &UILocalNotification )
👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:] or -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features
UILocalNotification and UIResponder only.unsafe fn application_handleActionWithIdentifier_forLocalNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, completion_handler: &Block<dyn Fn()> )
👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features
UILocalNotification and UIResponder and block2 only.unsafe fn application_handleActionWithIdentifier_forRemoteNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, response_info: &NSDictionary, completion_handler: &Block<dyn Fn()> )
👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features
UIResponder and block2 only.unsafe fn application_handleActionWithIdentifier_forRemoteNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, completion_handler: &Block<dyn Fn()> )
👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features
UIResponder and block2 only.unsafe fn application_handleActionWithIdentifier_forLocalNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, response_info: &NSDictionary, completion_handler: &Block<dyn Fn()> )
👎Deprecated: Use UserNotifications Framework’s -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]
Available on crate features
UILocalNotification and UIResponder and block2 only.unsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler( &self, application: &UIApplication, user_info: &NSDictionary, completion_handler: &Block<dyn Fn(UIBackgroundFetchResult)> )
Available on crate features
UIResponder and block2 only.unsafe fn application_performFetchWithCompletionHandler( &self, application: &UIApplication, completion_handler: &Block<dyn Fn(UIBackgroundFetchResult)> )
👎Deprecated: Use a BGAppRefreshTask in the BackgroundTasks framework instead
Available on crate features
UIResponder and block2 only.unsafe fn application_performActionForShortcutItem_completionHandler( &self, application: &UIApplication, shortcut_item: &UIApplicationShortcutItem, completion_handler: &Block<dyn Fn(Bool)> )
Available on crate features
UIApplicationShortcutItem and UIResponder and block2 only.unsafe fn application_handleEventsForBackgroundURLSession_completionHandler( &self, application: &UIApplication, identifier: &NSString, completion_handler: &Block<dyn Fn()> )
Available on crate features
UIResponder and block2 only.unsafe fn application_handleWatchKitExtensionRequest_reply( &self, application: &UIApplication, user_info: Option<&NSDictionary>, reply: &Block<dyn Fn(*mut NSDictionary)> )
Available on crate features
UIResponder and block2 only.unsafe fn applicationShouldRequestHealthAuthorization( &self, application: &UIApplication )
Available on crate feature
UIResponder only.unsafe fn applicationDidEnterBackground(&self, application: &UIApplication)
Available on crate feature
UIResponder only.unsafe fn applicationWillEnterForeground(&self, application: &UIApplication)
Available on crate feature
UIResponder only.Available on crate feature
UIResponder only.unsafe fn applicationProtectedDataDidBecomeAvailable( &self, application: &UIApplication )
Available on crate feature
UIResponder only.unsafe fn window(&self) -> Option<Retained<UIWindow>>
Available on crate features
UIResponder and UIView and UIWindow only.unsafe fn setWindow(&self, window: Option<&UIWindow>)
Available on crate features
UIResponder and UIView and UIWindow only.unsafe fn application_supportedInterfaceOrientationsForWindow( &self, application: &UIApplication, window: Option<&UIWindow> ) -> UIInterfaceOrientationMask
Available on crate features
UIOrientation and UIResponder and UIView and UIWindow only.unsafe fn application_shouldAllowExtensionPointIdentifier( &self, application: &UIApplication, extension_point_identifier: &UIApplicationExtensionPointIdentifier ) -> bool
Available on crate feature
UIResponder only.unsafe fn application_viewControllerWithRestorationIdentifierPath_coder( &self, application: &UIApplication, identifier_components: &NSArray<NSString>, coder: &NSCoder ) -> Option<Retained<UIViewController>>
Available on crate features
UIResponder and UIViewController only.unsafe fn application_shouldSaveSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder ) -> bool
Available on crate feature
UIResponder only.unsafe fn application_shouldRestoreSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder ) -> bool
Available on crate feature
UIResponder only.unsafe fn application_willEncodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder )
Available on crate feature
UIResponder only.unsafe fn application_didDecodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder )
Available on crate feature
UIResponder only.unsafe fn application_shouldSaveApplicationState( &self, application: &UIApplication, coder: &NSCoder ) -> bool
👎Deprecated: Use application:shouldSaveSecureApplicationState: instead
Available on crate feature
UIResponder only.unsafe fn application_shouldRestoreApplicationState( &self, application: &UIApplication, coder: &NSCoder ) -> bool
👎Deprecated: Use application:shouldRestoreSecureApplicationState: instead
Available on crate feature
UIResponder only.unsafe fn application_willContinueUserActivityWithType( &self, application: &UIApplication, user_activity_type: &NSString ) -> bool
Available on crate feature
UIResponder only.unsafe fn application_continueUserActivity_restorationHandler( &self, application: &UIApplication, user_activity: &NSUserActivity, restoration_handler: &Block<dyn Fn(*mut NSArray<ProtocolObject<dyn UIUserActivityRestoring>>)> ) -> bool
Available on crate features
UIResponder and UIUserActivity and block2 only.unsafe fn application_didFailToContinueUserActivityWithType_error( &self, application: &UIApplication, user_activity_type: &NSString, error: &NSError )
Available on crate feature
UIResponder only.unsafe fn application_didUpdateUserActivity( &self, application: &UIApplication, user_activity: &NSUserActivity )
Available on crate feature
UIResponder only.Available on crate features
UIResponder and objc2-cloud-kit only.unsafe fn application_configurationForConnectingSceneSession_options( &self, application: &UIApplication, connecting_scene_session: &UISceneSession, options: &UISceneConnectionOptions ) -> Retained<UISceneConfiguration>
Available on crate features
UIResponder and UISceneOptions and UISceneSession only.unsafe fn application_didDiscardSceneSessions( &self, application: &UIApplication, scene_sessions: &NSSet<UISceneSession> )
Available on crate features
UIResponder and UISceneSession only.unsafe fn applicationShouldAutomaticallyLocalizeKeyCommands( &self, application: &UIApplication ) -> bool
Available on crate feature
UIResponder only.