1

Im trying to get interstitial ads in my cocos2d game I made but having trouble getting it to work. Ive tried this snippet I found online for iOS7 but I cannot get it to work. Since the Controller uses CCNode instead of UIViewController Im not sure what needs to be done to get it to work. Any help is appreciated!

Here is the AppDelegate.m

#import "AppDelegate.h"
#import <iAd/iAd.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [UIViewController prepareInterstitialAds];
    return YES;
}

and this code inside MainController.m implementation

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    UIViewController *destination = [segue destinationViewController];

    destination.interstitialPresentationPolicy = 
         ADInterstitialPresentationPolicyAutomatic;
}

1 Answers1

0

I ended up using Chartboost for interstitial ads and it works perfect. Sorry for the mixup.