MPBaseEvent Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in MPBaseEvent.h

  timestamp

The timestamp when the event was created. Is non null but can be set by the client

@property (nonatomic, strong) NSDate *timestamp

Discussion

The timestamp when the event was created. Is non null but can be set by the client

Declared In

MPBaseEvent.h

  type

An enum value that indicates the type of event to be logged. If logging a screen event, this property will be overridden to MPEventTypeNavigation. In all other cases the SDK will honor the type assigned to this property.

@property (nonatomic, unsafe_unretained) MPEventType type

Discussion

An enum value that indicates the type of event to be logged. If logging a screen event, this property will be overridden to MPEventTypeNavigation. In all other cases the SDK will honor the type assigned to this property.

See Also

Declared In

MPBaseEvent.h

  messageType

An enum value that indicates the type of message to be sent assigned to this property.

@property (nonatomic, unsafe_unretained) MPMessageType messageType

Discussion

An enum value that indicates the type of message to be sent assigned to this property.

See Also

Declared In

MPBaseEvent.h

  customAttributes

A dictionary containing further information about the event. The number of entries is limited to 100 key value pairs. Keys must be strings (up to 255 characters) and values can be strings (up to 4096 characters), numbers, booleans, or dates

@property (nonatomic, strong, nullable) NSDictionary<NSString*id> *customAttributes

Discussion

A dictionary containing further information about the event. The number of entries is limited to 100 key value pairs. Keys must be strings (up to 255 characters) and values can be strings (up to 4096 characters), numbers, booleans, or dates

Declared In

MPBaseEvent.h

  customFlags

Custom flags are a collection of attributes used to trigger functionality in specific integrations. By default, most integrations will ignore custom flags. Reference the documentation for your integrations to see if they make use of custom flags.

@property (nonatomic, strong, readonly, nullable) NSMutableDictionary<NSString*__kindofNSArray<NSString*> *> *customFlags

Discussion

Custom flags are a collection of attributes used to trigger functionality in specific integrations. By default, most integrations will ignore custom flags. Reference the documentation for your integrations to see if they make use of custom flags.

Declared In

MPBaseEvent.h

  shouldBeginSession

Whether the SDK should automatically begin a session if one does not already exist (defaults to YES). This should typically be set to NO if the app is launched from a background notification.

@property (nonatomic) BOOL shouldBeginSession

Discussion

Whether the SDK should automatically begin a session if one does not already exist (defaults to YES). This should typically be set to NO if the app is launched from a background notification.

Declared In

MPBaseEvent.h

  dictionaryRepresentation

A Dictionary representation of this instance for uploading the event Must be overridden by a subclass

@property (nonatomic, readonly) NSDictionary<NSString*id> *dictionaryRepresentation

Discussion

A Dictionary representation of this instance for uploading the event Must be overridden by a subclass

Declared In

MPBaseEvent.h

– initWithEventType:

Initializes an instance of MPBaseEvent MPBaseEvent is an abstract parent class so you should always instantiate one of its children rather than the parent.

- (nullable instancetype)initWithEventType:(MPEventType)type

Parameters

type

An enum value that indicates the type of event to be logged.

Return Value

An instance of MPBaseEvent or nil, if it could not be initialized.

Discussion

Initializes an instance of MPBaseEvent MPBaseEvent is an abstract parent class so you should always instantiate one of its children rather than the parent.

Declared In

MPBaseEvent.h

– addCustomFlag:withKey:

Adds a custom flag associated with a key to the event.

- (void)addCustomFlag:(nonnull NSString *)customFlag withKey:(nonnull NSString *)key

Parameters

customFlag

A string attribute

key

The key associated with the custom flag.

Discussion

Adds a custom flag associated with a key to the event.

Declared In

MPBaseEvent.h

– addCustomFlags:withKey:

Adds an array of custom flags associated with a key to the event.

- (void)addCustomFlags:(nonnull NSArray<NSString*> *)customFlags withKey:(nonnull NSString *)key

Parameters

customFlags

An array of string attributes

key

The key associated with the custom flags.

Discussion

Adds an array of custom flags associated with a key to the event.

Declared In

MPBaseEvent.h