UAEvent

Objective-C

@interface UAEvent : NSObject

Swift

class UAEvent : NSObject

This base class encapsulates analytics events.

Event Properties

  • The time the event was created.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull time;

    Swift

    var time: String { get }
  • The unique event ID.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull eventID;

    Swift

    var eventID: String { get }
  • The event’s data.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDictionary *_Nonnull data;

    Swift

    var data: [AnyHashable : Any] { get }
  • The event’s type.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull eventType;

    Swift

    var eventType: String { get }
  • The event’s data.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSDictionary *_Nonnull eventData;

    Swift

    var eventData: [AnyHashable : Any] { get set }

Event Validation

  • Checks if the event is valid. Invalid events will be dropped.

    Declaration

    Objective-C

    - (BOOL)isValid;

    Swift

    func isValid() -> Bool

    Return Value

    YES if the event is valid.