AWSPinpointAnalyticsClient

@interface AWSPinpointAnalyticsClient : NSObject

/**
 Returns the `AWSPinpointEventRecorder` which is the low level client used to record events to local storage.
 
 You can use it for more advanced fine grained control over the events recorded.
 
 @returns the `AWSPinpointEventRecorder` used for storing events.
 */
@property (nonatomic, readonly) AWSPinpointEventRecorder * eventRecorder;

/**
 Adds the specified attribute to all subsequent recorded events.
 
 @param theValue the value of the attribute.
 @param theKey the name of the attribute to add.
 */
- (void)addGlobalAttribute:(NSString *)theValue
                    forKey:(NSString *)theKey;

/**
 Adds the specified attribute to all subsequent recorded events with the specified event type.
 
 @param theValue the value of the attribute.
 @param theKey the name of the attribute to add.
 @param theEventType the type of events to add the attribute to.
 */
- (void)addGlobalAttribute:(NSString *)theValue
                    forKey:(NSString *)theKey
              forEventType:(NSString *)theEventType;

/**
 Adds the specified metric to all subsequent recorded events.
 
 @param theValue the value of the metric
 @param theKey the name of the metric to add
 */
- (void)addGlobalMetric:(NSNumber *)theValue
                 forKey:(NSString *)theKey;

/**
 Adds the specified metric to all subsequent recorded events with the specified event type.
 
 @param theValue the value of the metric
 @param theKey the name of the metric to add
 @param theEventType the type of events to add the metric to
 */
- (void)addGlobalMetric:(NSNumber *)theValue
                 forKey:(NSString *)theKey
           forEventType:(NSString *)theEventType;

/**
 Removes the specified attribute. All subsequent recorded events will no longer have this global attribute.
 
 @param theKey the key of the attribute to remove
 */
- (void)removeGlobalAttributeForKey:(NSString*) theKey;

/**
 Removes the specified attribute. All subsequent recorded events with the specified event type will no longer have this global attribute.
 
 @param theKey the key of the attribute to remove
 @param theEventType the type of events to remove the attribute from
 */
- (void)removeGlobalAttributeForKey:(NSString*) theKey
                       forEventType:(NSString*) theEventType;

/**
 Removes the specified metric. All subsequent recorded events will no longer have this global metric.
 
 @param theKey the key of the metric to remove
 */
- (void)removeGlobalMetricForKey:(NSString*) theKey;

/**
 Removes the specified metric. All subsequent recorded events with the specified event type will no longer have this global metric.
 
 @param theKey the key of the metric to remove
 @param theEventType the type of events to remove the metric from
 */
- (void)removeGlobalMetricForKey:(NSString*) theKey
                    forEventType:(NSString*) theEventType;

/**
 Records the specified AWSPinpointEvent to the local filestore.
 
 @param theEvent The AWSPinpointEvent to persist
 
 @return AWSTask - task.result is always nil.
 */
-(AWSTask *) recordEvent:(AWSPinpointEvent *) theEvent;

/**
 Create an AWSPinpointEvent with the specified theEventType
 
 @param theEventType the type of event to create
 
 @returns an AWSPinpointEvent with the specified event type
 */
- (AWSPinpointEvent *)createEventWithEventType:(NSString *)theEventType;

/**
 Create an Apple monetization AWSPinpointEvent of type "_monetization.purchase" with the specified parameters.
 
 @param transaction A SKPaymentTransaction object returned from an IAP
 @param product A SKProduct object of the an IAP
 
 @returns an AWSPinpointEvent with the specified event type
 */
- (AWSPinpointEvent *)createAppleMonetizationEventWithTransaction:(SKPaymentTransaction *) transaction withProduct:(SKProduct *) product;

/**
 Create a Virtual monetization AWSPinpointEvent of type "_monetization.purchase" with the specified parameters.
 
 @param theProductId A product identifier for your virtual monitization event
 @param theItemPrice An item price for your virtual monitization event
 @param theQuantity A quantity of how many products sold for your virtual monitization event
 @param theCurrency The currency for your virtual monitization event
 
 @returns an AWSPinpointEvent with the specified event type
 */
- (AWSPinpointEvent *)createVirtualMonetizationEventWithProductId:(NSString *)theProductId
                                                    withItemPrice:(double)theItemPrice
                                                     withQuantity:(NSInteger)theQuantity
                                                     withCurrency:(NSString *)theCurrency;
/**
 Submits all recorded events to Pinpoint.
 Events are automatically submitted when the application goes into the background.
 
 @return AWSTask - task.result contains successful submitted events.
 */
- (AWSTask *) submitEvents;

/**
 Submits all recorded events to Pinpoint.
 Events are automatically submitted when the application goes into the background.
 
 @param completionBlock The block to be executed after submission has completed.
 
 @return AWSTask - task.result is always nil.
 */
- (AWSTask *) submitEventsWithCompletionBlock:(AWSPinpointCompletionBlock) completionBlock;

@end

Undocumented

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

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

    @returns the AWSPinpointEventRecorder used for storing events.

    Declaration

    Objective-C

    @property (readonly, nonatomic) AWSPinpointEventRecorder *_Nonnull eventRecorder;

    Swift

    var eventRecorder: AWSPinpointEventRecorder { get }
  • Adds the specified attribute to all subsequent recorded events.

    Declaration

    Objective-C

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

    Swift

    func addGlobalAttribute(_ theValue: String, forKey theKey: String)

    Parameters

    theValue

    the value of the attribute.

    theKey

    the name of the attribute to add.

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

    Declaration

    Objective-C

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

    Swift

    func addGlobalAttribute(_ theValue: String, forKey theKey: String, forEventType theEventType: String)

    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.

  • Adds the specified metric to all subsequent recorded events.

    Declaration

    Objective-C

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

    Swift

    func addGlobalMetric(_ theValue: NSNumber, forKey theKey: String)

    Parameters

    theValue

    the value of the metric

    theKey

    the name of the metric to add

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

    Declaration

    Objective-C

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

    Swift

    func addGlobalMetric(_ theValue: NSNumber, forKey theKey: String, forEventType theEventType: String)

    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

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

    Declaration

    Objective-C

    - (void)removeGlobalAttributeForKey:(nonnull NSString *)theKey;

    Swift

    func removeGlobalAttribute(forKey theKey: String)

    Parameters

    theKey

    the key of the attribute to remove

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

    Declaration

    Objective-C

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

    Swift

    func removeGlobalAttribute(forKey theKey: String, forEventType theEventType: String)

    Parameters

    theKey

    the key of the attribute to remove

    theEventType

    the type of events to remove the attribute from

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

    Declaration

    Objective-C

    - (void)removeGlobalMetricForKey:(nonnull NSString *)theKey;

    Swift

    func removeGlobalMetric(forKey theKey: String)

    Parameters

    theKey

    the key of the metric to remove

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

    Declaration

    Objective-C

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

    Swift

    func removeGlobalMetric(forKey theKey: String, forEventType theEventType: String)

    Parameters

    theKey

    the key of the metric to remove

    theEventType

    the type of events to remove the metric from

  • Records the specified AWSPinpointEvent to the local filestore.

    Declaration

    Objective-C

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

    Swift

    func record(_ theEvent: AWSPinpointEvent) -> AWSTask

    Parameters

    theEvent

    The AWSPinpointEvent to persist

    Return Value

    AWSTask - task.result is always nil.

  • Create an AWSPinpointEvent with the specified theEventType

    @returns an AWSPinpointEvent with the specified event type

    Declaration

    Objective-C

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

    Swift

    func createEvent(withEventType theEventType: String) -> AWSPinpointEvent

    Parameters

    theEventType

    the type of event to create

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

    @returns an AWSPinpointEvent with the specified event type

    Declaration

    Objective-C

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

    Swift

    func createAppleMonetizationEvent(with transaction: SKPaymentTransaction, with product: SKProduct) -> AWSPinpointEvent

    Parameters

    transaction

    A SKPaymentTransaction object returned from an IAP

    product

    A SKProduct object of the an IAP

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

    @returns an AWSPinpointEvent with the specified event type

    Declaration

    Objective-C

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

    Swift

    func createVirtualMonetizationEvent(withProductId theProductId: String, withItemPrice theItemPrice: Double, withQuantity theQuantity: Int, withCurrency theCurrency: String) -> AWSPinpointEvent

    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

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

    Declaration

    Objective-C

    - (nonnull AWSTask *)submitEvents;

    Swift

    func submitEvents() -> AWSTask

    Return Value

    AWSTask - task.result contains successful submitted events.

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

    Declaration

    Objective-C

    - (nonnull AWSTask *)submitEventsWithCompletionBlock:
        (nonnull AWSPinpointCompletionBlock)completionBlock;

    Swift

    func submitEvents(completionBlock: @escaping AWSPinpointCompletionBlock) -> AWSTask

    Parameters

    completionBlock

    The block to be executed after submission has completed.

    Return Value

    AWSTask - task.result is always nil.