Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Significant event issue? #297

Open
JulesMoorhouse opened this issue Jun 20, 2017 · 5 comments
Open

Significant event issue? #297

JulesMoorhouse opened this issue Jun 20, 2017 · 5 comments

Comments

@JulesMoorhouse
Copy link

JulesMoorhouse commented Jun 20, 2017

I'm not sure if this is an issue or I've setup something wrong, however on my significant event, the prompt to rate the app happens each time, however I have eventsUntilPrompt set to 5.

I would like the rating dialog to display immediately after 5 significant events have occurred.

Here's my implementation...

App Delegate

#ifdef FREEMIUM
[iRate sharedInstance].appStoreID = 123;

#else
[iRate sharedInstance].appStoreID = 456;

#endif

[iRate sharedInstance].daysUntilPrompt = 3;
[iRate sharedInstance].usesUntilPrompt = 5;
[iRate sharedInstance].eventsUntilPrompt = 5;
[iRate sharedInstance].verboseLogging = NO;
[iRate sharedInstance].remindPeriod = 1;
[iRate sharedInstance].promptAtLaunch = YES;
[iRate sharedInstance].useUIAlertControllerIfAvailable = YES;
[iRate sharedInstance].delegate = self;
[iRate sharedInstance].onlyPromptIfLatestVersion = YES;
[iRate sharedInstance].applicationName = @"Balance Guide";

Call significant event

    [[iRate sharedInstance] promptForRating];

Looking back at the documentation, promptForRating happens immediately, should I be using promptIfAllCriteriaMet instead? Oh I think I may need to use logEvent, however I'm not sure how I then call iRate? Maybe I need to check eventCount then use PromptForRating, however do I then need to reset the number of events ?

@nicklockwood
Copy link
Owner

You shouldn't need to call [[iRate sharedInstance] promptForRating]; at all. It will automatically display the prompt once all criteria are met. The promptForRating method is only needed if you want to have a "rate now" button in your settings or something.

@JulesMoorhouse
Copy link
Author

JulesMoorhouse commented Jun 20, 2017

Sorry I updated my question. I would like the rating dialog to display immediately after 5 significant events have occurred.

@JulesMoorhouse
Copy link
Author

JulesMoorhouse commented Jun 20, 2017

So do I need to use logEvent to increment and a condition of eventCount with PromptForRating ? But surely I need to reset the event count ? Actually I shouldn't really show it again afterwards.

@nicklockwood
Copy link
Owner

If you use -[[iRate sharedInstance] logEvent: YES] the prompt will show immediately after you've called iteventsUntilPrompt times, provided that the other criteria have also been met.

@JulesMoorhouse
Copy link
Author

Thanks, is there a method to show the dialog just based on reaching eventsUntilPrompt?

If not if I checked the eventCount and used PromptForRating, code I stop the rating being shown once other criteria was met? I don't want to ask them again once I've had 5 significant events and asked them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants