nicklockwood / iRate

[DEPRECATED]
http://charcoaldesign.co.uk/source/cocoa#irate
Other
4.1k stars 733 forks source link

iRate tries to show the dialog even on the background #192

Open banaslee opened 9 years ago

banaslee commented 9 years ago

Hi,

my app uses geofencing and so it opens in the background when it receives a location call. With a normal setup iRate will try to present its dialog even though the app is not active. I think by default iRate shouldn't attempt to do anything while in the background as this will also count for the use count.

For now I'm preventing this by implementing -iRateShouldPromptForRating like follows:

- (BOOL)iRateShouldPromptForRating {
    return [UIApplication sharedApplication].applicationState == UIApplicationStateActive;
}

However this won't prevent the use count to be wrongly incremented (at least accordingly to my expectations).

This was at least messing with my event tracking. The number of times users selected Rate, Decline or Later didn't add up to the number of times the rate dialog was shown.