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 }
-
State of the share: MCLShareStateSent, MCLShareStateClicked, MCLShareStateOpened or MCLShareStateInstalled
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 *_Nonnull data;
Swift
var data: [AnyHashable : Any] { get }
-
URL that is associated with the share object.
This is the URL you should use to navigate within the app, but the shared url will have https://mgcl.co/
prepended and _m=<referralCode>
appended to it. If not given defaults to@"/"
. The URL will be normalized by adding leading slash to the path if absent, and stripping any trailing slash.Declaration
Objective-C
@property (readonly, strong, nonatomic) NSURL *_Nonnull URL;
Swift
var url: URL { get }