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
launchOptionscontains the message id used to collect metrics.
completionHandlerA 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
applicationStateto make sure the app was in background.
userInfocontains the message id used to collect metrics.
completionHandlerA block object to be executed when the send metrics operation finishes. Defaulted to no action.
View on GitHub
AGPushAnalytics Class Reference