简体   繁体   中英

Appirater methods are not being called

I'm using Appirater and am very excited by the functionality, but unfortunately I can't get it to work. I use the following code in the appDelegate file when the app launches, as per instruction:

[Appirater appLaunched];

I put a breakpoint on that line, and it is indeed getting called, but none of my breakpoints within the Appirater class actually hit at all. I had put a second breakpoint within the appLaunched method within the Appirater.m file and it never hits. Any advice on what might be going on here is appreciated. I tried setting debug to YES, changing the days till prompt to 0, but these should not even matter, since the first method that's supposed to hit within Appirater does not even seem to be doing so.

Yes, I imported Appirater.h

Don't you get a warning that say that above code is deprecated?

Also don't forget you need to initiate it with some defaults values (just random values):

[Appirater setAppId:appID];
[Appirater setDaysUntilPrompt:0;

[Appirater setUsesUntilPrompt:5];

[Appirater setTimeBeforeReminding:0];

[Appirater setUsesAfterReminding:10];

And finally :

[Appirater appLaunched:YES];

I would also implement :

- (void)applicationWillEnterForegroundNotification:(NSNotification *)notification{
    [Appirater appEnteredForeground:YES];

}

The pop up will show after setUsesUntilPrompt numbers of times either by coming to foreground or by app launches if you did implement the willEnterForeground notification.

I found out last night that the plugin package was working after all when I was showing a friend my app and the rating request appeared. I still don't know why none of the breakpoints within that class hit, but maybe it's because they are all static methods? Either way, If you have a similar issue, just hang in there and see if it works after trying it a bit.

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