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§
unsafe fn applicationDidFinishLaunching(&self)
unsafe fn applicationDidBecomeActive(&self)
unsafe fn applicationWillResignActive(&self)
unsafe fn applicationWillEnterForeground(&self)
unsafe fn applicationDidEnterBackground(&self)
unsafe fn handleWorkoutConfiguration( &self, workout_configuration: &HKWorkoutConfiguration, )
Available on crate feature
objc2-health-kit only.unsafe fn handleActiveWorkoutRecovery(&self)
unsafe fn handleExtendedRuntimeSession( &self, extended_runtime_session: &WKExtendedRuntimeSession, )
Available on crate feature
WKExtendedRuntimeSession only.unsafe fn handleRemoteNowPlayingActivity(&self)
Sourceunsafe fn handleUserActivity(&self, user_info: Option<&NSDictionary>)
unsafe fn handleUserActivity(&self, user_info: Option<&NSDictionary>)
§Safety
user_info generic should be of the correct type.
unsafe fn handleActivity(&self, user_activity: &NSUserActivity)
unsafe fn handleIntent_completionHandler( &self, intent: &INIntent, completion_handler: &DynBlock<dyn Fn(NonNull<INIntentResponse>)>, )
Available on crate features
block2 and objc2-intents only.unsafe fn handleBackgroundTasks( &self, background_tasks: &NSSet<WKRefreshBackgroundTask>, )
Available on crate feature
WKBackgroundTask only.unsafe fn deviceOrientationDidChange(&self)
unsafe fn didRegisterForRemoteNotificationsWithDeviceToken( &self, device_token: &NSData, )
unsafe fn didFailToRegisterForRemoteNotificationsWithError( &self, error: &NSError, )
Sourceunsafe fn didReceiveRemoteNotification_fetchCompletionHandler(
&self,
user_info: &NSDictionary,
completion_handler: &DynBlock<dyn Fn(WKBackgroundFetchResult)>,
)
Available on crate features WKExtension and block2 only.
unsafe fn didReceiveRemoteNotification_fetchCompletionHandler( &self, user_info: &NSDictionary, completion_handler: &DynBlock<dyn Fn(WKBackgroundFetchResult)>, )
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.
Available on crate feature
objc2-cloud-kit only.