pub unsafe trait UIApplicationDelegate: NSObjectProtocol + MainThreadOnly {
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: &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 { ... }
unsafe fn application_performFetchWithCompletionHandler(
&self,
application: &UIApplication,
completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>,
)
where Self: Sized + Message { ... }
unsafe fn application_performActionForShortcutItem_completionHandler(
&self,
application: &UIApplication,
shortcut_item: &UIApplicationShortcutItem,
completion_handler: &DynBlock<dyn Fn(Bool)>,
)
where Self: Sized + Message { ... }
unsafe 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 { ... }
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: &DynBlock<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 { ... }
}
UIApplication
only.Expand description
Provided Methods§
unsafe fn applicationDidFinishLaunching(&self, application: &UIApplication)
UIResponder
only.unsafe fn application_willFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>>, ) -> bool
UIResponder
only.unsafe fn application_didFinishLaunchingWithOptions( &self, application: &UIApplication, launch_options: Option<&NSDictionary<UIApplicationLaunchOptionsKey, AnyObject>>, ) -> bool
UIResponder
only.unsafe fn applicationDidBecomeActive(&self, application: &UIApplication)
UIResponder
only.unsafe fn applicationWillResignActive(&self, application: &UIApplication)
UIResponder
only.unsafe fn application_handleOpenURL( &self, application: &UIApplication, url: &NSURL, ) -> bool
UIResponder
only.unsafe fn application_openURL_sourceApplication_annotation( &self, application: &UIApplication, url: &NSURL, source_application: Option<&NSString>, annotation: &AnyObject, ) -> bool
UIResponder
only.unsafe fn application_openURL_options( &self, app: &UIApplication, url: &NSURL, options: &NSDictionary<UIApplicationOpenURLOptionsKey, AnyObject>, ) -> bool
UIResponder
only.unsafe fn applicationDidReceiveMemoryWarning(&self, application: &UIApplication)
UIResponder
only.unsafe fn applicationWillTerminate(&self, application: &UIApplication)
UIResponder
only.unsafe fn applicationSignificantTimeChange(&self, application: &UIApplication)
UIResponder
only.unsafe fn application_willChangeStatusBarOrientation_duration( &self, application: &UIApplication, new_status_bar_orientation: UIInterfaceOrientation, duration: NSTimeInterval, )
UIOrientation
and UIResponder
only.unsafe fn application_didChangeStatusBarOrientation( &self, application: &UIApplication, old_status_bar_orientation: UIInterfaceOrientation, )
UIOrientation
and UIResponder
only.unsafe fn application_willChangeStatusBarFrame( &self, application: &UIApplication, new_status_bar_frame: CGRect, )
UIResponder
and objc2-core-foundation
only.unsafe fn application_didChangeStatusBarFrame( &self, application: &UIApplication, old_status_bar_frame: CGRect, )
UIResponder
and objc2-core-foundation
only.unsafe fn application_didRegisterUserNotificationSettings( &self, application: &UIApplication, notification_settings: &UIUserNotificationSettings, )
UIResponder
and UIUserNotificationSettings
only.unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &UIApplication, device_token: &NSData, )
UIResponder
only.unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &UIApplication, error: &NSError, )
UIResponder
only.unsafe fn application_didReceiveRemoteNotification( &self, application: &UIApplication, user_info: &NSDictionary, )
UIResponder
only.unsafe fn application_didReceiveLocalNotification( &self, application: &UIApplication, notification: &UILocalNotification, )
UILocalNotification
and UIResponder
only.unsafe fn application_handleActionWithIdentifier_forLocalNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, completion_handler: &DynBlock<dyn Fn()>, )
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: &DynBlock<dyn Fn()>, )
UIResponder
and block2
only.unsafe fn application_handleActionWithIdentifier_forRemoteNotification_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, )
UIResponder
and block2
only.unsafe fn application_handleActionWithIdentifier_forLocalNotification_withResponseInfo_completionHandler( &self, application: &UIApplication, identifier: Option<&NSString>, notification: &UILocalNotification, response_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn()>, )
UILocalNotification
and UIResponder
and block2
only.Sourceunsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler(
&self,
application: &UIApplication,
user_info: &NSDictionary,
completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>,
)
Available on crate features UIResponder
and block2
only.
unsafe fn application_didReceiveRemoteNotification_fetchCompletionHandler( &self, application: &UIApplication, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>, )
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. !
Sourceunsafe fn application_performFetchWithCompletionHandler(
&self,
application: &UIApplication,
completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>,
)
👎Deprecated: Use a BGAppRefreshTask in the BackgroundTasks framework insteadAvailable on crate features UIResponder
and block2
only.
unsafe fn application_performFetchWithCompletionHandler( &self, application: &UIApplication, completion_handler: &DynBlock<dyn Fn(UIBackgroundFetchResult)>, )
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.
unsafe fn application_performActionForShortcutItem_completionHandler( &self, application: &UIApplication, shortcut_item: &UIApplicationShortcutItem, completion_handler: &DynBlock<dyn Fn(Bool)>, )
UIApplicationShortcutItem
and UIResponder
and block2
only.unsafe fn application_handleEventsForBackgroundURLSession_completionHandler( &self, application: &UIApplication, identifier: &NSString, completion_handler: &DynBlock<dyn Fn()>, )
UIResponder
and block2
only.unsafe fn application_handleWatchKitExtensionRequest_reply( &self, application: &UIApplication, user_info: Option<&NSDictionary>, reply: &DynBlock<dyn Fn(*mut NSDictionary)>, )
UIResponder
and block2
only.unsafe fn applicationShouldRequestHealthAuthorization( &self, application: &UIApplication, )
UIResponder
only.unsafe fn applicationDidEnterBackground(&self, application: &UIApplication)
UIResponder
only.unsafe fn applicationWillEnterForeground(&self, application: &UIApplication)
UIResponder
only.UIResponder
only.unsafe fn applicationProtectedDataDidBecomeAvailable( &self, application: &UIApplication, )
UIResponder
only.unsafe fn window(&self) -> Option<Retained<UIWindow>>
UIResponder
and UIView
and UIWindow
only.Sourceunsafe fn setWindow(&self, window: Option<&UIWindow>)
Available on crate features UIResponder
and UIView
and UIWindow
only.
unsafe fn setWindow(&self, window: Option<&UIWindow>)
UIResponder
and UIView
and UIWindow
only.Setter for window
.
unsafe fn application_supportedInterfaceOrientationsForWindow( &self, application: &UIApplication, window: Option<&UIWindow>, ) -> UIInterfaceOrientationMask
UIOrientation
and UIResponder
and UIView
and UIWindow
only.unsafe fn application_shouldAllowExtensionPointIdentifier( &self, application: &UIApplication, extension_point_identifier: &UIApplicationExtensionPointIdentifier, ) -> bool
UIResponder
only.unsafe fn application_viewControllerWithRestorationIdentifierPath_coder( &self, application: &UIApplication, identifier_components: &NSArray<NSString>, coder: &NSCoder, ) -> Option<Retained<UIViewController>>
UIResponder
and UIViewController
only.unsafe fn application_shouldSaveSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
UIResponder
only.unsafe fn application_shouldRestoreSecureApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
UIResponder
only.unsafe fn application_willEncodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder, )
UIResponder
only.unsafe fn application_didDecodeRestorableStateWithCoder( &self, application: &UIApplication, coder: &NSCoder, )
UIResponder
only.unsafe fn application_shouldSaveApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
UIResponder
only.unsafe fn application_shouldRestoreApplicationState( &self, application: &UIApplication, coder: &NSCoder, ) -> bool
UIResponder
only.unsafe fn application_willContinueUserActivityWithType( &self, application: &UIApplication, user_activity_type: &NSString, ) -> bool
UIResponder
only.unsafe fn application_continueUserActivity_restorationHandler( &self, application: &UIApplication, user_activity: &NSUserActivity, restoration_handler: &DynBlock<dyn Fn(*mut NSArray<ProtocolObject<dyn UIUserActivityRestoring>>)>, ) -> bool
UIResponder
and UIUserActivity
and block2
only.unsafe fn application_didFailToContinueUserActivityWithType_error( &self, application: &UIApplication, user_activity_type: &NSString, error: &NSError, )
UIResponder
only.unsafe fn application_didUpdateUserActivity( &self, application: &UIApplication, user_activity: &NSUserActivity, )
UIResponder
only.UIResponder
and objc2-cloud-kit
only.unsafe fn application_configurationForConnectingSceneSession_options( &self, application: &UIApplication, connecting_scene_session: &UISceneSession, options: &UISceneConnectionOptions, ) -> Retained<UISceneConfiguration>
UIResponder
and UISceneOptions
and UISceneSession
only.unsafe fn application_didDiscardSceneSessions( &self, application: &UIApplication, scene_sessions: &NSSet<UISceneSession>, )
UIResponder
and UISceneSession
only.unsafe fn applicationShouldAutomaticallyLocalizeKeyCommands( &self, application: &UIApplication, ) -> bool
UIResponder
only.