AGPushAnalytics

Utility class used to send metrics information to the AeroGear UnifiedPush Server when the app is opened due to a Push notification.

  • Send metrics to the AeroGear Push server when the app is launched due to a push notification.

    Declaration

    Swift

    class public func sendMetricsWhenAppLaunched(launchOptions: [NSObject:AnyObject]?, completionHandler: ((error: NSError? ) -> Void) = {(error: NSError?) in })

    Parameters

    launchOptions

    contains the message id used to collect metrics.

    completionHandler

    A block object to be executed when the send metrics operation finishes. Defaulted to no action.

  • Send metrics to the AeroGear Push server when the app is brought from background to foreground due to a push notification.

    Declaration

    Swift

    class public func sendMetricsWhenAppAwoken(applicationState: UIApplicationState, userInfo: [NSObject:AnyObject], completionHandler: ((error: NSError? ) -> Void) = {(error: NSError?) in })

    Parameters

    applicationState

    to make sure the app was in background.

    userInfo

    contains the message id used to collect metrics.

    completionHandler

    A block object to be executed when the send metrics operation finishes. Defaulted to no action.