UAAppIntegration

@interface UAAppIntegration : 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 UNUserNotificationDelegate’s userNotificationCenter:willPresentNotification:withCompletionHandler.

    Declaration

    Objective-C

    + (void)userNotificationCenter:(nonnull UNUserNotificationCenter *)center
        didReceiveNotificationResponse:(nonnull UNNotificationResponse *)response
                 withCompletionHandler:(nonnull void (^)(void))completionHandler;

    Swift

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

    Parameters

    center

    The notification center.

    response

    The notification response.

    completionHandler

    A completion handler.

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

    Declaration

    Objective-C

    + (void)userNotificationCenter:(nonnull UNUserNotificationCenter *)center
           willPresentNotification:(nonnull UNNotification *)notification
             withCompletionHandler:
                 (nonnull void (^)(UNNotificationPresentationOptions))
                     completionHandler;

    Swift

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

    Parameters

    center

    The notification center.

    notification

    The notification about to be presented.

    completionHandler

    A completion handler to be called with the desired notification presentation options.

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

    Declaration

    Objective-C

    + (void)application:(nonnull UIApplication *)application
        performFetchWithCompletionHandler:
            (nonnull void (^)(UIBackgroundFetchResult))completionHandler;

    Swift

    class func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)

    Parameters

    application

    The application instance.

    completionHandler

    completionHandler The completion handler.

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

    Declaration

    Objective-C

    + (void)application:(nonnull UIApplication *)application
        didRegisterForRemoteNotificationsWithDeviceToken:
            (nonnull NSData *)deviceToken;

    Swift

    class func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)

    Parameters

    application

    The application instance.

    deviceToken

    The APNS device token.

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

    Declaration

    Objective-C

    + (void)application:(nonnull UIApplication *)application
        didFailToRegisterForRemoteNotificationsWithError:(nonnull NSError *)error;

    Swift

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

    Parameters

    application

    The application instance.

    error

    An NSError object that encapsulates information why registration did not succeed.

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

    Declaration

    Objective-C

    + (void)application:(nonnull UIApplication *)application
        didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
              fetchCompletionHandler:
                  (nonnull void (^)(UIBackgroundFetchResult))completionHandler;

    Swift

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

    Parameters

    application

    The application instance.

    userInfo

    The remote notification.

    completionHandler

    The completion handler.