MCLMegacoolConfig
@interface MCLMegacoolConfig : NSObject
Configure core aspects of the SDK.
-
If wrapping Megacool from a different tool, like a game engine or your custom layer, set a name for this wrapper and a version. This helps us track down bugs by seeing behavioral differences between versions.
Declaration
Objective-C
- (void)setWrapper:(nonnull NSString *)wrapper version:(nonnull NSString *)version;
Swift
func setWrapper(_ wrapper: String, version: String)
Parameters
wrapper
the name of the wrapper, like
@"Unity"
or@"ACMECorpEngine"
.version
the version of the wrapper, like
@"1.0"
or@"2.3-rc4"
. -
The delegate that should receive callbacks for different events in the SDK.
Declaration
Objective-C
@property (readwrite, nonatomic, nullable) id<MCLDelegate> delegate;
Swift
weak var delegate: MCLDelegate? { get set }
-
The base url to use when building the absolute share urls.
This defaults to
mgcl.co/<app-identifier>
. The absolute url for a share will behttps://<base-url><share-url>?_m=<referral-code>
.The url must have at least a
host
to be valid.This is a premium feature that also requires configuration on the dashboard to work properly.
Declaration
Objective-C
@property (readwrite, strong, nonatomic, nullable) NSURL *baseUrl;
Swift
var baseUrl: URL? { get set }