AWSPinpointEventRecorder Class Reference

Inherits from AWSService : NSObject
Declared in AWSPinpointEventRecorder.h
AWSPinpointEventRecorder.m

Overview

AWSPinpointEventRecorder stores events to a local sql lite databse and submits them to Pinpoint.

This is the low level client used to record events to local storage.

You should only use this class for more advanced controls over your events stored locally. Please use AWSPinpointAnalyticsClient for recording events.

  diskBytesUsed

The number of bytes currently used to store AWSPinpointEvent objects on disk.

@property (nonatomic, assign, readonly) uint64_t diskBytesUsed

Declared In

AWSPinpointEventRecorder.h

  notificationByteThreshold

The threshold of disk bytes for notification. When exceeded, saveEvent: posts AWSPinpointEventByteThresholdReachedNotification. The default is 0 meaning it will not post the notification.

@property (nonatomic, assign) NSUInteger notificationByteThreshold

Discussion

The notificationByteThreshold should be smaller than diskByteLimit.

Declared In

AWSPinpointEventRecorder.h

  diskByteLimit

The limit of the disk cache size in bytes. When exceeded, older requests will be discarded. Setting this value to 0.0 meaning no practical limit. The default value is 5MB.

@property (nonatomic, assign) NSUInteger diskByteLimit

Declared In

AWSPinpointEventRecorder.h

  diskAgeLimit

The age limit of the cached requests. When exceeded, requests older than the specified age will be discarded. Setting this value to 0 meaning no practical limit. The default is no age limit.

@property (nonatomic, assign) NSTimeInterval diskAgeLimit

Declared In

AWSPinpointEventRecorder.h

  submissionInProgress

Indicates if submission of events is in progress, only one submission of events is allowed at a time.

@property (nonatomic, assign) BOOL submissionInProgress

Declared In

AWSPinpointEventRecorder.h

  batchRecordsByteLimit

The maxium batch data size in bytes. The default value is 512KB. The maximum is 4MB.

@property (nonatomic, assign) NSUInteger batchRecordsByteLimit

Declared In

AWSPinpointEventRecorder.h

– saveEvent:

Saves an event to local storage to be sent later.

- (AWSTask<AWSPinpointEvent*> *)saveEvent:(AWSPinpointEvent *)event

Parameters

event

The event to send to Amazon Pinpoint.

Return Value

AWSTask - task.result contains the saved event.

Declared In

AWSPinpointEventRecorder.h

– getEvents

Retrieves events in local storage with a limit of 128 events.

- (AWSTask<NSArray<AWSPinpointEvent*> *> *)getEvents

Return Value

AWSTask - task.result contains an array of AWSPinpointEvent objects.

Declared In

AWSPinpointEventRecorder.h

– getEventsWithLimit:

Retrieves events in local storage with the specified limit.

- (AWSTask<NSArray<AWSPinpointEvent*> *> *)getEventsWithLimit:(NSNumber *)limit

Return Value

AWSTask - task.result contains an array of AWSPinpointEvent objects.

Declared In

AWSPinpointEventRecorder.h

– getDirtyEvents

Retrieves dirty events in local storage with a limit of 128 events.

- (AWSTask<NSArray<AWSPinpointEvent*> *> *)getDirtyEvents

Return Value

AWSTask - task.result contains an array of AWSPinpointEvent objects.

Declared In

AWSPinpointEventRecorder.h

– getDirtyEventsWithLimit:

Retrieves dirty events in local storage with the specified limit.

- (AWSTask<NSArray<AWSPinpointEvent*> *> *)getDirtyEventsWithLimit:(NSNumber *)limit

Return Value

AWSTask - task.result contains an array of AWSPinpointEvent objects.

Declared In

AWSPinpointEventRecorder.h

– submitAllEvents

Submits all locally saved events to Amazon Pinpoint. Events that are successfully sent will be deleted from the device. Events that fail due to the device being offline will stop the submission process and be kept. Events that fail due to other reasons (such as the event being invalid) will be marked dirty and moved to a dirty table.

- (AWSTask<NSArray<AWSPinpointEvent*> *> *)submitAllEvents

Return Value

AWSTask - task.result contains an array of AWSPinpointEvent objects that were submitted.

Declared In

AWSPinpointEventRecorder.h

– removeAllEvents

Removes all events saved to disk.

- (AWSTask *)removeAllEvents

Return Value

AWSTask - task.result is always nil.

Declared In

AWSPinpointEventRecorder.h

– removeAllDirtyEvents

Removes all dirty events saved to disk.

- (AWSTask *)removeAllDirtyEvents

Return Value

AWSTask - task.result is always nil.

Declared In

AWSPinpointEventRecorder.h