samedi 29 novembre 2014

IOS Fullscreen ad implementation

I am calling requestInterstitialAdPresentation from a SKScene. The ad appears but I am unclear on a few things.



  1. According to this you need to create a new ad object everytime. Which explains why the ad only works once. However, I dont not have the requestInterstitialAdPresentation in a view controller. I have it in my SKScene.


To get it to work, I am calling [self.view.window.rootViewController requestInterstitialAdPresentation];


With just self.view.window how can an ad object be reinitialized




  1. I can see in apples documentation the methods that are being called when the viewcontroller is the delagate of the ad


    -(void)interstitialAd:(ADInterstitialAd *)interstitialAd didFailWithError:(NSError *)error -(void)interstitialAdDidLoad:(ADInterstitialAd *)interstitialAd -(void)interstitialAdDidUnload:(ADInterstitialAd *)interstitialAd -(void)interstitialAdActionDidFinish:(ADInterstitialAd *)interstitialAd




I would like to know when the ad closes either by itself or because the user requests so that I can continue the game.


Currently, when the user touches reply, the ad plays and the game begins in the background. When the user closes the ad, they can begin to play. I would like to delay that until the user ends the ad or closes it


Here is the code I have for it



if ([node.name isEqualToString:@"retry"]) {
[self.view.window.rootViewController requestInterstitialAdPresentation];
[self revealGame];
}



Aucun commentaire:

Enregistrer un commentaire