MCLShare
@interface MCLShare : NSObject
MCLShare holds information about a share, like which state it has (MCLShareStateSent, MCLShareStateClicked, MCLShareStateOpened or MCLShareStateInstalled), the URL and custom data.
-
Unique referral code for each share which is part of the link.
The referral code is assigned when the share is shared, thus not available when you’ve instantiated the share yourself.
Declaration
Objective-C
@property (readonly, strong, atomic) MCLReferralCode *_Nonnull referralCode;
Swift
var referralCode: MCLReferralCode { get }
-
How far the share has come towards generating an install.
Declaration
Objective-C
@property (readonly, atomic) MCLShareState state;
Swift
var state: MCLShareState { get }
-
Timestamp of when the share was created
Declaration
Objective-C
@property (readonly, strong, atomic) NSDate *_Nonnull createdAt;
Swift
var createdAt: Date { get }
-
Timestamp of the last update to the share
Declaration
Objective-C
@property (readonly, strong, atomic) NSDate *_Nonnull updatedAt;
Swift
var updatedAt: Date { get }
-
Data associated with the share object
Declaration
Objective-C
@property (readonly, strong, atomic) NSDictionary<NSString *, NSObject *> *_Nonnull data;
Swift
var data: [String : NSObject] { get }
-
The URL for the share.
For navigation purposes inside the app you should probably use
MCLLinkClickedEvent.url
instead, as that’s computed locally and thus faster and works offline.Note that a url set with
MCLShareConfig.url
when the share was created might be"/"
(the default) on a share received fromMCLReceivedShareOpenedEvent
orSentShareOpenedEvent
if the network request to create the share failed.Declaration
Objective-C
@property (readonly, strong, nonatomic) NSURL *_Nonnull URL;
Swift
var url: URL { get }