Classes
The following classes are available globally.
-
A link was clicked by the user.
This event is purely local to the device and thus both available offline and very fast, and thus suitable for navigation within the app (with sanity checking of destinations).
See
For more details on which properties are available on events when clicking links, see https://docs.megacool.co/learn/linksDeclaration
Objective-C
@interface MCLLinkClickedEvent : NSObject
Swift
class MCLLinkClickedEvent : NSObject
-
Configure core aspects of the SDK.
See moreDeclaration
Objective-C
@interface MCLMegacoolConfig : NSObject
Swift
class MCLMegacoolConfig : NSObject
-
A view that previews a recording.
Created by
See more-[Megacool getPreview]
. The view is initially transparent, but becomes visible when we have loaded at least one frame to show.Declaration
Objective-C
@interface MCLPreview : UIView
Swift
class MCLPreview : UIView
-
Pass this to
-[Megacool getPreviewWithConfig:]
to customize the preview.Note
This class does not have atomic properties for efficiency, thus it’s not thread-safe.Declaration
Objective-C
@interface MCLPreviewConfig : NSObject
Swift
class MCLPreviewConfig
-
Declaration
Objective-C
@interface MCLPreviewData : NSObject
Swift
class MCLPreviewData : NSObject
-
This device clicked on a share sent by someone else.
Note that this event does not fire when clicking your own links.
See
https://docs.megacool.co/learn/links for more info on when different properties are available on the event.Declaration
Objective-C
@interface MCLReceivedShareOpenedEvent : NSObject
Swift
class MCLReceivedShareOpenedEvent : NSObject
-
Pass this to
-[Megacool startRecording:withConfig:]
to configure how recordings are made.Note
This class does not have atomic properties for efficiency, thus it’s not thread-safe.Declaration
Objective-C
@interface MCLRecordingConfig : NSObject <NSCopying>
Swift
class MCLRecordingConfig : NSObject, NSCopying
-
The referral code is the magic part tacked on to URLs shared through the SDK that allows us to credit a user for inviting others. You do not need to create these yourself.
A referral code consists of two parts:
userId
: 8 characters that uniquely identifies the user/app combination.shareId
: 2+ characters that identifies a given share. This enables us to associate each share with a GIF.
Declaration
Objective-C
@interface MCLReferralCode : NSObject
Swift
class MCLReferralCode : NSObject
-
A share sent from this device caused the app to be opened by someone else.
Note that this event does not fire when clicking your own links.
See
https://docs.megacool.co/learn/links for more details about when different properties are available on the event.Declaration
Objective-C
@interface MCLSentShareOpenedEvent : NSObject
Swift
class MCLSentShareOpenedEvent : NSObject
-
MCLShare holds information about a share, like which state it has (MCLShareStateSent, MCLShareStateClicked, MCLShareStateOpened or MCLShareStateInstalled), the URL and custom data.
See moreDeclaration
Objective-C
@interface MCLShare : NSObject
Swift
class MCLShare : NSObject
-
Pass this to
-[Megacool presentShareWithConfig:]
to configure how a share is performed.Note
This class does not have atomic properties for efficiency, thus it’s not thread-safe.Declaration
Objective-C
@interface MCLShareConfig : NSObject <NSCopying>
Swift
class MCLShareConfig : NSObject, NSCopying
-
This is the main interface to the functionality the Megacool SDK offers. Make sure you call
See more-[Megacool start]
as early as possible in the app lifecycle for referrals to be detected early and reliably.Declaration
Objective-C
@interface Megacool : NSObject
Swift
class Megacool : NSObject