Skip to content

Instantly share code, notes, and snippets.

@rolandoam
Last active December 18, 2015 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolandoam/5834149 to your computer and use it in GitHub Desktop.
Save rolandoam/5834149 to your computer and use it in GitHub Desktop.
// MyDelegate.m
-(void)vungleMoviePlayed:(VGPlayData*)playData
{
// movie ad finished, get times from playData
if ([playData playedFull]) {
// give reward to user
}
}
// This is the code that initializes vungle
- (void)vungleStart {
// assuming either self == instance of MyDelegate, or implements the VGVunglePubDelegate protocol
[VGVunglePub setDelegate:self];
// start vungle publisher library
[VGVunglePub startWithPubAppID:[Prefs pubAppIDGet] userData:data];
}
// somewhere else in your app code
[VGVunglePub playIncentivizedAd:vungleViewController animated:TRUE showClose:TRUE userTag:@"user123"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment