简体   繁体   中英

APPIRATER setsignificantevent iOS

Basically I am using appirator to let user for rating my app only when the user does some signification events.Here is it how I have done it. 1.Have set the following in my app delegate

[Appirater setAppId:jumpStart.appID];
[Appirater setSignificantEventsUntilPrompt:3];
[Appirater appLaunched:YES];

2.Now in one of my view controller there is a button which tells the user to provide feedback.If the user has hit the button,then on its action I have provided the following.

[Appirater userDidSignificantEvent:YES]; 

Now,if the user has hit the button3 times then the Rating popup should appear.But,this is not happening.Can anybody let me know where is it that I am going wrong.Do I need to do something else apart from this.

simply use this.

[Appirater setAppId:@"122133"];
[Appirater setDaysUntilPrompt:0];
[Appirater setUsesUntilPrompt:0];
[Appirater setSignificantEventsUntilPrompt:3];
[Appirater appLaunched:YES];

You also need to days until prompt and uses until prompt too zeros:

[Appirater setDaysUntilPrompt:0];
[Appirater setUsesUntilPrompt:0];

Otherwise defaults values are too big for your case (30 days and 20 uses).

Since you could have triggered some events during testing, you would need to explicitly reset them before trying again.

While Appirator didn't provide the methods to reset, you could reset by setting NSUserDefaults directly eg

[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"kAppiraterDeclinedToRate"];

Other keys to reset are kAppiraterReminderRequestDate and kAppiraterSignificantEventCount . You can find all the keys in Appirator.m.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM