WKApplicationDelegate

Trait WKApplicationDelegate 

Source
pub unsafe trait WKApplicationDelegate: NSObjectProtocol + MainThreadOnly {
Show 18 methods // Provided methods unsafe fn applicationDidFinishLaunching(&self) where Self: Sized + Message { ... } unsafe fn applicationDidBecomeActive(&self) where Self: Sized + Message { ... } unsafe fn applicationWillResignActive(&self) where Self: Sized + Message { ... } unsafe fn applicationWillEnterForeground(&self) where Self: Sized + Message { ... } unsafe fn applicationDidEnterBackground(&self) where Self: Sized + Message { ... } unsafe fn handleWorkoutConfiguration( &self, workout_configuration: &HKWorkoutConfiguration, ) where Self: Sized + Message { ... } unsafe fn handleActiveWorkoutRecovery(&self) where Self: Sized + Message { ... } unsafe fn handleExtendedRuntimeSession( &self, extended_runtime_session: &WKExtendedRuntimeSession, ) where Self: Sized + Message { ... } unsafe fn handleRemoteNowPlayingActivity(&self) where Self: Sized + Message { ... } unsafe fn handleUserActivity(&self, user_info: Option<&NSDictionary>) where Self: Sized + Message { ... } unsafe fn handleActivity(&self, user_activity: &NSUserActivity) where Self: Sized + Message { ... } unsafe fn handleIntent_completionHandler( &self, intent: &INIntent, completion_handler: &DynBlock<dyn Fn(NonNull<INIntentResponse>)>, ) where Self: Sized + Message { ... } unsafe fn handleBackgroundTasks( &self, background_tasks: &NSSet<WKRefreshBackgroundTask>, ) where Self: Sized + Message { ... } unsafe fn deviceOrientationDidChange(&self) where Self: Sized + Message { ... } unsafe fn didRegisterForRemoteNotificationsWithDeviceToken( &self, device_token: &NSData, ) where Self: Sized + Message { ... } unsafe fn didFailToRegisterForRemoteNotificationsWithError( &self, error: &NSError, ) where Self: Sized + Message { ... } unsafe fn didReceiveRemoteNotification_fetchCompletionHandler( &self, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn(WKBackgroundFetchResult)>, ) where Self: Sized + Message { ... } unsafe fn userDidAcceptCloudKitShareWithMetadata( &self, cloud_kit_share_metadata: &CKShareMetadata, ) where Self: Sized + Message { ... }
}
Available on crate feature WKApplication only.
Expand description

Provided Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

unsafe fn handleWorkoutConfiguration( &self, workout_configuration: &HKWorkoutConfiguration, )
where Self: Sized + Message,

Available on crate feature objc2-health-kit only.
Source

unsafe fn handleActiveWorkoutRecovery(&self)
where Self: Sized + Message,

Source

unsafe fn handleExtendedRuntimeSession( &self, extended_runtime_session: &WKExtendedRuntimeSession, )
where Self: Sized + Message,

Available on crate feature WKExtendedRuntimeSession only.
Source

unsafe fn handleRemoteNowPlayingActivity(&self)
where Self: Sized + Message,

Source

unsafe fn handleUserActivity(&self, user_info: Option<&NSDictionary>)
where Self: Sized + Message,

§Safety

user_info generic should be of the correct type.

Source

unsafe fn handleActivity(&self, user_activity: &NSUserActivity)
where Self: Sized + Message,

Source

unsafe fn handleIntent_completionHandler( &self, intent: &INIntent, completion_handler: &DynBlock<dyn Fn(NonNull<INIntentResponse>)>, )
where Self: Sized + Message,

Available on crate features block2 and objc2-intents only.
Source

unsafe fn handleBackgroundTasks( &self, background_tasks: &NSSet<WKRefreshBackgroundTask>, )
where Self: Sized + Message,

Available on crate feature WKBackgroundTask only.
Source

unsafe fn deviceOrientationDidChange(&self)
where Self: Sized + Message,

Source

unsafe fn didRegisterForRemoteNotificationsWithDeviceToken( &self, device_token: &NSData, )
where Self: Sized + Message,

Source

unsafe fn didFailToRegisterForRemoteNotificationsWithError( &self, error: &NSError, )
where Self: Sized + Message,

Source

unsafe fn didReceiveRemoteNotification_fetchCompletionHandler( &self, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn(WKBackgroundFetchResult)>, )
where Self: Sized + Message,

Available on crate features WKExtension 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 background notification.!

§Safety

user_info generic should be of the correct type.

Source

unsafe fn userDidAcceptCloudKitShareWithMetadata( &self, cloud_kit_share_metadata: &CKShareMetadata, )
where Self: Sized + Message,

Available on crate feature objc2-cloud-kit only.

Trait Implementations§

Source§

impl ProtocolType for dyn WKApplicationDelegate

Source§

const NAME: &'static str = "WKApplicationDelegate"

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 WKApplicationDelegate

Implementations on Foreign Types§

Source§

impl<T> WKApplicationDelegate for ProtocolObject<T>

Implementors§