AppIntegration

@objc(UAAppIntegration)
public class AppIntegration : NSObject

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

    @available(*, deprecated, message: "Use application(_:performFetchWithCompletionHandler:﹚ instead")
    @objc(applicatin:performFetchWithCompletionHandler:)
    public class func applicatin(
        _ application: UIApplication,
        performFetchWithCompletionHandler completionHandler: @escaping (
            UIBackgroundFetchResult
        ) -> Void
    )

    Parameters

    application

    The application

    completionHandler

    The completion handler.

  • Must be called by the UIApplicationDelegate’s application:performFetchWithCompletionHandler:.

    Declaration

    Swift

    @objc(application:performFetchWithCompletionHandler:)
    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

    @objc(application:didRegisterForRemoteNotificationsWithDeviceToken:)
    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

    @objc
    public class func application(
        _ application: UIApplication,
        didFailToRegisterForRemoteNotificationsWithError error: Error
    )

    Parameters

    application

    The application

    error

    The error.

  • Must be called by the UIApplicationDelegate’s application:didReceiveRemoteNotification:fetchCompletionHandler:.

    Declaration

    Swift

    @objc
    @MainActor
    public class func application(
        _ application: UIApplication,
        didReceiveRemoteNotification userInfo: [AnyHashable: Any],
        fetchCompletionHandler completionHandler: @escaping (
            UIBackgroundFetchResult
        ) -> Void
    )

    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:.

  • Must be called by the UNUserNotificationDelegate’s userNotificationCenter:willPresentNotification:withCompletionHandler.

    Declaration

    Swift

    @available(*, deprecated, message: "Use userNotificationCenter(_:willPresent:withCompletionHandler:﹚ instead")
    @objc
    public class func userNotificationCenter(
        center: UNUserNotificationCenter,
        willPresentNotification notification: UNNotification,
        withCompletionHandler completionHandler: @escaping (
            _ options: UNNotificationPresentationOptions
        ) -> Void
    )

    Parameters

    center

    The notification center.

    notification

    The notification.

    completionHandler

    The completion handler.

  • Must be called by the UNUserNotificationDelegate’s userNotificationCenter:willPresentNotification:withCompletionHandler.

    Declaration

    Swift

    @objc(userNotificationCenter:willPresentNotification:withCompletionHandler:)
    public class func userNotificationCenter(
        _ center: UNUserNotificationCenter,
        willPresent notification: UNNotification,
        withCompletionHandler completionHandler: @escaping (
            _ options: UNNotificationPresentationOptions
        ) -> Void
    )

    Parameters

    center

    The notification center.

    notification

    The notification.

    completionHandler

    The completion handler.

  • Must be called by the UNUserNotificationDelegate’s userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler.

    Declaration

    Swift

    @available(*, deprecated, message: "Use userNotificationCenter(_:didReceive:withCompletionHandler:﹚ instead")
    @objc
    public class func userNotificationCenter(
        center: UNUserNotificationCenter,
        didReceiveNotificationResponse response: UNNotificationResponse,
        withCompletionHandler completionHandler: @escaping () -> Void
    )

    Parameters

    center

    The notification center.

    response

    The notification response.

    completionHandler

    The completion handler.

  • Must be called by the UNUserNotificationDelegate’s userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler.

    Declaration

    Swift

    @objc(userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:)
    public class func userNotificationCenter(
        _ center: UNUserNotificationCenter,
        didReceive response: UNNotificationResponse,
        withCompletionHandler completionHandler: @escaping () -> Void
    )

    Parameters

    center

    The notification center.

    response

    The notification response.

    completionHandler

    The completion handler.