AWSPinpointAnalyticsClient Class Reference

Inherits from NSObject
Declared in AWSPinpointAnalyticsClient.h
AWSPinpointAnalyticsClient.m

  eventRecorder

Returns the AWSPinpointEventRecorder which is the low level client used to record events to local storage.

@property (nonatomic, readonly) AWSPinpointEventRecorder *eventRecorder

Return Value

the AWSPinpointEventRecorder used for storing events.

Discussion

You can use it for more advanced fine grained control over the events recorded.

Declared In

AWSPinpointAnalyticsClient.h

– addGlobalAttribute:forKey:

Adds the specified attribute to all subsequent recorded events.

- (void)addGlobalAttribute:(NSString *)theValue forKey:(NSString *)theKey

Parameters

theValue

the value of the attribute.

theKey

the name of the attribute to add.

Declared In

AWSPinpointAnalyticsClient.h

– addGlobalAttribute:forKey:forEventType:

Adds the specified attribute to all subsequent recorded events with the specified event type.

- (void)addGlobalAttribute:(NSString *)theValue forKey:(NSString *)theKey forEventType:(NSString *)theEventType

Parameters

theValue

the value of the attribute.

theKey

the name of the attribute to add.

theEventType

the type of events to add the attribute to.

Declared In

AWSPinpointAnalyticsClient.h

– addGlobalMetric:forKey:

Adds the specified metric to all subsequent recorded events.

- (void)addGlobalMetric:(NSNumber *)theValue forKey:(NSString *)theKey

Parameters

theValue

the value of the metric

theKey

the name of the metric to add

Declared In

AWSPinpointAnalyticsClient.h

– addGlobalMetric:forKey:forEventType:

Adds the specified metric to all subsequent recorded events with the specified event type.

- (void)addGlobalMetric:(NSNumber *)theValue forKey:(NSString *)theKey forEventType:(NSString *)theEventType

Parameters

theValue

the value of the metric

theKey

the name of the metric to add

theEventType

the type of events to add the metric to

Declared In

AWSPinpointAnalyticsClient.h

– removeGlobalAttributeForKey:

Removes the specified attribute. All subsequent recorded events will no longer have this global attribute.

- (void)removeGlobalAttributeForKey:(NSString *)theKey

Parameters

theKey

the key of the attribute to remove

Declared In

AWSPinpointAnalyticsClient.h

– removeGlobalAttributeForKey:forEventType:

Removes the specified attribute. All subsequent recorded events with the specified event type will no longer have this global attribute.

- (void)removeGlobalAttributeForKey:(NSString *)theKey forEventType:(NSString *)theEventType

Parameters

theKey

the key of the attribute to remove

theEventType

the type of events to remove the attribute from

Declared In

AWSPinpointAnalyticsClient.h

– removeGlobalMetricForKey:

Removes the specified metric. All subsequent recorded events will no longer have this global metric.

- (void)removeGlobalMetricForKey:(NSString *)theKey

Parameters

theKey

the key of the metric to remove

Declared In

AWSPinpointAnalyticsClient.h

– removeGlobalMetricForKey:forEventType:

Removes the specified metric. All subsequent recorded events with the specified event type will no longer have this global metric.

- (void)removeGlobalMetricForKey:(NSString *)theKey forEventType:(NSString *)theEventType

Parameters

theKey

the key of the metric to remove

theEventType

the type of events to remove the metric from

Declared In

AWSPinpointAnalyticsClient.h

– recordEvent:

Records the specified AWSPinpointEvent to the local filestore.

- (AWSTask *)recordEvent:(AWSPinpointEvent *)theEvent

Parameters

theEvent

The AWSPinpointEvent to persist

Return Value

AWSTask - task.result is always nil.

Declared In

AWSPinpointAnalyticsClient.h

– createEventWithEventType:

Create an AWSPinpointEvent with the specified theEventType

- (AWSPinpointEvent *)createEventWithEventType:(NSString *)theEventType

Parameters

theEventType

the type of event to create

Return Value

an AWSPinpointEvent with the specified event type

Declared In

AWSPinpointAnalyticsClient.h

– createAppleMonetizationEventWithTransaction:withProduct:

Create an Apple monetization AWSPinpointEvent of type “_monetization.purchase” with the specified parameters.

- (AWSPinpointEvent *)createAppleMonetizationEventWithTransaction:(SKPaymentTransaction *)transaction withProduct:(SKProduct *)product

Parameters

transaction

A SKPaymentTransaction object returned from an IAP

product

A SKProduct object of the an IAP

Return Value

an AWSPinpointEvent with the specified event type

Declared In

AWSPinpointAnalyticsClient.h

– createVirtualMonetizationEventWithProductId:withItemPrice:withQuantity:withCurrency:

Create a Virtual monetization AWSPinpointEvent of type “_monetization.purchase” with the specified parameters.

- (AWSPinpointEvent *)createVirtualMonetizationEventWithProductId:(NSString *)theProductId withItemPrice:(double)theItemPrice withQuantity:(NSInteger)theQuantity withCurrency:(NSString *)theCurrency

Parameters

theProductId

A product identifier for your virtual monitization event

theItemPrice

An item price for your virtual monitization event

theQuantity

A quantity of how many products sold for your virtual monitization event

theCurrency

The currency for your virtual monitization event

Return Value

an AWSPinpointEvent with the specified event type

Declared In

AWSPinpointAnalyticsClient.h

– submitEvents

Submits all recorded events to Pinpoint. Events are automatically submitted when the application goes into the background.

- (AWSTask *)submitEvents

Return Value

AWSTask - task.result contains successful submitted events.

Declared In

AWSPinpointAnalyticsClient.h

– submitEventsWithCompletionBlock:

Submits all recorded events to Pinpoint. Events are automatically submitted when the application goes into the background.

- (AWSTask *)submitEventsWithCompletionBlock:(AWSPinpointCompletionBlock)completionBlock

Parameters

completionBlock

The block to be executed after submission has completed.

Return Value

AWSTask - task.result is always nil.

Declared In

AWSPinpointAnalyticsClient.h