Вопрос

I started using flurry ads using the two following statements in appDeleget.m appDeleget.m

if(![[NSUserDefaults standardUserDefaults] boolForKey:@"Purchased"]) {
    [Flurry startSession:FLURRY_ID];//FLURRY_ID is the #define @"flurry_adID"
    [FlurryAds initialize:self.window.rootViewController];        
}

util Until the user does not exit the application at least once after purchase, flurryAds not stops, flurryAds don't stop.

i I want to stop flurry ads immediately after user purchase purchasing the application.

Это было полезно?

Решение

Don't use the appDelegate. Check the if statement in a ViewController. The reason why is not working for you, is because your calling this in the AppDelegate. Where are you calling this code? DidFinishLaunching method?

What I would do is: When purchased: Create BOOL key and call this when the purchase is completed. Then you can still use the appDelegate to check with NSUserDefaults.

[Flurry startSession:FLURRY_ID];//FLURRY_ID is the #define @"flurry_adID"
[FlurryAds initialize:self.window.rootViewController];
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top