MCLDelegate
@protocol MCLDelegate <NSObject>
-
Optional callback when a user has completed a share.
Note that this is not super reliable, some apps will cause this to be called even if the share was dismissed, or cause
megacoolDidDismissShareView
to be called when the share was actually completed.Integration:
1) Add a MCLDelegate to your Interface:
\@interface ViewController ()<MCLDelegate>
2) Set Delegate to self:
[[Megacool sharedMegacool] setDelegate:self];
3) Implement the method somewhere in your code:
- (void) megacoolDidCompleteShare { NSLog(@"Reward Player"); }
Note
This method being called does not imply that anyone has actually joined the game from the share, only that the share was sent over some channel.Declaration
Objective-C
- (void)megacoolDidCompleteShare;
Swift
optional func megacoolDidCompleteShare()
-
Optional callback when a user has aborted (dismissed) a share.
Note that this is not super reliable, some apps will cause this to be called even if the share was completed, or cause
megacoolDidCompleteShare
to be called when the share was actually dismissed.Integration:
1) Add a MCLDelegate to your Interface:
\@interface ViewController ()<MCLDelegate>
2) Set Delegate to self:
[[Megacool sharedMegacool] setDelegate:self];
3) Add the method somewhere in your code:
- (void)megacoolDidDismissShareView{ NSLog(@"Dismissed sharing"); }
Declaration
Objective-C
- (void)megacoolDidDismissShareView;
Swift
optional func megacoolDidDismissShareView()