MCLEvent
Deprecated
Use MCLLinkClickedEvent, MCLReceivedShareEvent and MCLSentShareEvent instead
@interface MCLEvent : NSObject
MCLEvent
s are passed in the callback of +[Megacool startWithAppConfig:andEventHandler:]
and is triggered soon after the app opens. There are three types of events which is defined in
MCLEventType
.
-
A megacool share object associated with the event.
This will not be set on events with type
MCLEventLinkClicked
, since they happen locally. After the link clicked event is sent, a request will be sent to the backend to fetch the share object, which will then be attached to aMCLEventReceivedShareOpened
event.Might be
nil
if a share could not be found for the event, which can happen if a user removes the last characters of the referral code before clicking or similar. -
When the event occured.
Declaration
Objective-C
@property (readonly, strong, atomic) NSDate *_Nonnull createdAt;
Swift
var createdAt: Date { get }
-
type of event
Declaration
Objective-C
@property (readonly, atomic) MCLEventType type;
Swift
var type: MCLEventType { get }
-
Whether the event happened for the first time on the event’s originating device. This is only relevant for SentShareOpened/ReceivedShareOpened events, and always false for LinkClicked events
Declaration
Objective-C
@property (readonly, atomic) BOOL isFirstSession;
Swift
var isFirstSession: Bool { get }
-
Data associated to the event.
Which values is present will vary with the type of event, but will be available under the keys
MCLEventDataURL
,MCLEventDataReferralCode
orMCLEventDataReceiverReferralCode
.Declaration
Objective-C
@property (readonly, strong, atomic) NSDictionary *_Nonnull data;
Swift
var data: [AnyHashable : Any] { get }