AppIntegration
public class AppIntegration
Application hooks required by Airship. If automaticSetupEnabled
is enabled
(enabled by default), Airship will automatically integrate these calls into
the application by swizzling methods. If automaticSetupEnabled
is disabled,
the application must call through to every method provided by this class.
-
Must be called by the UIApplicationDelegate’s application:performFetchWithCompletionHandler:.
Declaration
Swift
@MainActor public class func application( _ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping ( UIBackgroundFetchResult ) -> Void )
Parameters
application
The application
completionHandler
The completion handler.
-
Must be called by the UIApplicationDelegate’s application:didRegisterForRemoteNotificationsWithDeviceToken:.
Declaration
Swift
@MainActor public class func application( _ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data )
Parameters
application
The application
deviceToken
The device token.
-
Must be called by the UIApplicationDelegate’s application:didFailToRegisterForRemoteNotificationsWithError:.
Declaration
Swift
@MainActor public class func application( _ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: any Error )
Parameters
application
The application
error
The error.
-
application(_:
AsynchronousdidReceiveRemoteNotification: ) Must be called by the UIApplicationDelegate’s application:didReceiveRemoteNotification:fetchCompletionHandler:.
Declaration
Swift
@MainActor public class func application( _ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any] ) async -> UIBackgroundFetchResult
Parameters
application
The application
userInfo
The remote notification.
completionHandler
The completion handler.
-
Must be called by the WKExtensionDelegate’s didRegisterForRemoteNotificationsWithDeviceToken:.
-
Must be called by the WKExtensionDelegate’s didFailToRegisterForRemoteNotificationsWithError:.
-
Must be called by the WKExtensionDelegate’s didReceiveRemoteNotification:fetchCompletionHandler:.
-
userNotificationCenter(_:
AsynchronouswillPresent: ) Must be called by the UNUserNotificationDelegate’s userNotificationCenter:willPresentNotification:withCompletionHandler.
Declaration
Swift
@MainActor public class func userNotificationCenter( _ center: UNUserNotificationCenter, willPresent notification: UNNotification ) async -> UNNotificationPresentationOptions
Parameters
center
The notification center.
notification
The notification.
-
userNotificationCenter(_:
AsynchronousdidReceive: ) Must be called by the UNUserNotificationDelegate’s userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler.
Declaration
Swift
@MainActor public class func userNotificationCenter( _ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse ) async
Parameters
center
The notification center.
response
The notification response.