Question

When you start Chartboost session with:

[chartBoostInstance startSession]

in the appDelegate,the ads start showing.

How do I stop the session if I implement an in-app purchase that removes the ad?

Lejla

Was it helpful?

Solution

This link here claims that-

Use this Chartboost SDK delegate method to prevent interstitials until the second startSession:

- (BOOL)shouldRequestInterstitialsInFirstSession {
        return NO;
    }

OTHER TIPS

[cb startSession]; only Notify the beginning of a user session.not show the adds.you show ads by showInterstitial method

[cb showInterstitial];

so when user made in app purchase then set bool key isPurchase YES in your NSUserDefaults

and check when show ads

if(![userDefaults boolForKey:@"isPurchase"])
        {
             NSLog(@"Enter add start ");

           [[Chartboost sharedChartboost]  showInterstitial];
        }
        [userDefaults synchronize];

    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top