문제

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