AWSPinpointEventRecorder
Objective-C
@interface AWSPinpointEventRecorder
Swift
class AWSPinpointEventRecorder
AWSPinpointEventRecorder
stores events to a local SQLite database 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.
-
The number of bytes currently used to store AWSPinpointEvent objects on disk.
Declaration
Objective-C
@property (nonatomic, readonly) uint64_t diskBytesUsed;
Swift
var diskBytesUsed: UInt64 { get }
-
The threshold of disk bytes for notification. When exceeded,
saveEvent:
posts AWSPinpointEventByteThresholdReachedNotification. The default is 0 meaning it will not post the notification. @discussion ThenotificationByteThreshold
should be smaller thandiskByteLimit
.Declaration
Objective-C
@property (nonatomic) NSUInteger notificationByteThreshold;
Swift
var notificationByteThreshold: UInt { get set }
-
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.
Declaration
Objective-C
@property (nonatomic) NSUInteger diskByteLimit;
Swift
var diskByteLimit: UInt { get set }
-
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.
Declaration
Objective-C
@property (nonatomic) NSTimeInterval diskAgeLimit;
Swift
var diskAgeLimit: TimeInterval { get set }
-
Indicates if submission of events is in progress, only one submission of events is allowed at a time.
Declaration
Objective-C
@property (nonatomic) BOOL submissionInProgress;
Swift
var submissionInProgress: Bool { get set }
-
The maxium batch data size in bytes. The default value is 512KB. The maximum is 4MB.
Declaration
Objective-C
@property (nonatomic) NSUInteger batchRecordsByteLimit;
Swift
var batchRecordsByteLimit: UInt { get set }
-
Saves an event to local storage to be sent later.
Declaration
Objective-C
- (nonnull AWSTask *)saveEvent:(nonnull AWSPinpointEvent *)event;
Swift
func save(_ event: AWSPinpointEvent) -> Any!
Parameters
event
The event to send to Amazon Pinpoint.
Return Value
AWSTask - task.result contains the saved event.
-
Retrieves events in local storage with a limit of 100 events (the limit per batch).
Declaration
Objective-C
- (nonnull AWSTask *)getEvents;
Swift
func getEvents() -> Any!
Return Value
AWSTask - task.result contains an array of AWSPinpointEvent objects.
-
Retrieves events in local storage with the specified limit.
Declaration
Objective-C
- (nonnull AWSTask *)getEventsWithLimit:(nonnull NSNumber *)limit;
Swift
func getEventsWithLimit(_ limit: NSNumber) -> Any!
Return Value
AWSTask - task.result contains an array of AWSPinpointEvent objects.
-
Retrieves dirty events in local storage with a limit of 100 events (the limit per batch).
Declaration
Objective-C
- (nonnull AWSTask *)getDirtyEvents;
Swift
func getDirtyEvents() -> Any!
Return Value
AWSTask - task.result contains an array of AWSPinpointEvent objects.
-
Retrieves dirty events in local storage with the specified limit.
Declaration
Objective-C
- (nonnull AWSTask *)getDirtyEventsWithLimit:(nonnull NSNumber *)limit;
Swift
func getDirtyEvents(withLimit limit: NSNumber) -> Any!
Return Value
AWSTask - task.result contains an array of AWSPinpointEvent objects.
-
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.
Declaration
Objective-C
- (nonnull AWSTask *)submitAllEvents;
Swift
func submitAllEvents() -> Any!
Return Value
AWSTask - task.result contains an array of AWSPinpointEvent objects that were submitted.
-
Removes all events saved to disk.
Declaration
Objective-C
- (nonnull AWSTask *)removeAllEvents;
Swift
func removeAllEvents() -> Any!
Return Value
AWSTask - task.result is always nil.
-
Removes all dirty events saved to disk.
Declaration
Objective-C
- (nonnull AWSTask *)removeAllDirtyEvents;
Swift
func removeAllDirtyEvents() -> Any!
Return Value
AWSTask - task.result is always nil.