WKExtensionDelegate

Trait WKExtensionDelegate 

Source
pub unsafe trait WKExtensionDelegate: NSObjectProtocol + MainThreadOnly {
Show 24 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 { ... } unsafe fn handleActionWithIdentifier_forRemoteNotification( &self, identifier: Option<&NSString>, remote_notification: &NSDictionary, ) where Self: Sized + Message { ... } unsafe fn handleActionWithIdentifier_forLocalNotification( &self, identifier: Option<&NSString>, local_notification: &UILocalNotification, ) where Self: Sized + Message { ... } unsafe fn handleActionWithIdentifier_forRemoteNotification_withResponseInfo( &self, identifier: Option<&NSString>, remote_notification: &NSDictionary, response_info: &NSDictionary, ) where Self: Sized + Message { ... } unsafe fn handleActionWithIdentifier_forLocalNotification_withResponseInfo( &self, identifier: Option<&NSString>, local_notification: &UILocalNotification, response_info: &NSDictionary, ) where Self: Sized + Message { ... } unsafe fn didReceiveRemoteNotification(&self, user_info: &NSDictionary) where Self: Sized + Message { ... } unsafe fn didReceiveLocalNotification( &self, notification: &UILocalNotification, ) where Self: Sized + Message { ... }
}
Available on crate feature WKExtension 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 feature 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.
Source

unsafe fn handleActionWithIdentifier_forRemoteNotification( &self, identifier: Option<&NSString>, remote_notification: &NSDictionary, )
where Self: Sized + Message,

👎Deprecated: use UNUserNotificationCenterDelegate
§Safety

remote_notification generic should be of the correct type.

Source

unsafe fn handleActionWithIdentifier_forLocalNotification( &self, identifier: Option<&NSString>, local_notification: &UILocalNotification, )
where Self: Sized + Message,

👎Deprecated: use UNUserNotificationCenterDelegate
Available on crate feature objc2-ui-kit only.
Source

unsafe fn handleActionWithIdentifier_forRemoteNotification_withResponseInfo( &self, identifier: Option<&NSString>, remote_notification: &NSDictionary, response_info: &NSDictionary, )
where Self: Sized + Message,

👎Deprecated: use UNUserNotificationCenterDelegate
§Safety
  • remote_notification generic should be of the correct type.
  • response_info generic should be of the correct type.
Source

unsafe fn handleActionWithIdentifier_forLocalNotification_withResponseInfo( &self, identifier: Option<&NSString>, local_notification: &UILocalNotification, response_info: &NSDictionary, )
where Self: Sized + Message,

👎Deprecated: use UNUserNotificationCenterDelegate
Available on crate feature objc2-ui-kit only.
§Safety

response_info generic should be of the correct type.

Source

unsafe fn didReceiveRemoteNotification(&self, user_info: &NSDictionary)
where Self: Sized + Message,

👎Deprecated: use UNUserNotificationCenterDelegate
§Safety

user_info generic should be of the correct type.

Source

unsafe fn didReceiveLocalNotification(&self, notification: &UILocalNotification)
where Self: Sized + Message,

👎Deprecated: use UNUserNotificationCenterDelegate
Available on crate feature objc2-ui-kit only.

Trait Implementations§

Source§

impl ProtocolType for dyn WKExtensionDelegate

Source§

const NAME: &'static str = "WKExtensionDelegate"

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 WKExtensionDelegate

Implementations on Foreign Types§

Source§

impl<T> WKExtensionDelegate for ProtocolObject<T>

Implementors§