Comments (5)
The logic above is to check if the shouldPromptForRating function should return NO, in other words:
"if too few uses AND too few events then DO NOT prompt"
This is consistent with the documentation, because the implication here is that if either the uses or the events thresholds are met then then above condition will fail and it will prompt.
from irate.
That logic is failing for me because the use count is being met but the events count isn't and it is NOT returning no . The implication it seems to me is that both conditions must be met, and if one is met, but the other isn't, then it will not return NO (sorry about that double negative. My situation:
irate.usesUntilPrompt = 3;
irate.eventsUntilPrompt = 16;
I'll get 3 uses, and 3 events:
if (3 < 3 /* false _/ && 3 < 16 /_true*))
{
// False and true do not equal true, so this will not occur, but I want it to. I do not want to show the prompt just yet.
}
I'm rushing out the door to get my wisdom teeth removed, so I hope I got this right. I won't be able to reply until the meds wear off. :D
Thanks for your fast reply!
from irate.
Yes, so (using your example) the documentation says that the prompt will show if 3 < 3 or 3 < 16, and that's what's happening. What you are now saying is that you only want it to show if 3 < 3 and 3 < 16, contrary to the documentation.
Arguably I guess that may be more useful, so I might consider changing this behaviour, but it's technically correct as documented.
To override the prompt logic, without modifying the library (which is a bad idea for future compatibility), you can implement the iRateDelegate and supply your own logic in the iRate:shouldPromptForRating: delegate method.
from irate.
I looked into changing the way it works, but it would be too likely to introduce bugs in existing projects due to the defaults. Since both useCount and eventCount default to 10, and both are optional, if I made them mandatory, users would have to remember to set eventCount to zero if they weren't using it, otherwise the rating would never appear. I think it's best just to leave it as it is.
from irate.
Hi Nick,
Thanks for looking into this but you're correct to leave it as it is, and the documentation is correct. I was confused by the double negative, sorry about that! I do think that i will hack my copy tho to be OR instead of AND because for my purposes it makes more sense.
Thanks again,
C
from irate.
Related Issues (20)
- iRate will be allowed for iOS 11? HOT 2
- useSKStoreReviewControllerIfAvailable is ignored HOT 4
- Significant event issue? HOT 5
- SKStoreReviewController is not used in manual prompt request HOT 2
- Use `+initialize` instead `+load` to instantiate iRate singleton HOT 3
- Submit button disabled on SKStoreReviewController HOT 4
- Localizations bug with Chinese simplified and traditional
- iOS 11 problem with opening app page in the App Store HOT 20
- Can you add prompt to update on new version available HOT 2
- How should I reset iRate totally?
- iRate Not show HOT 1
- Show Review Alert only if user has not submitted any review?
- ratedThisVersion not set if using SKStoreReviewController? HOT 4
- iOS Swift : Message and Message Title are not working
- iRate Delegates are Not getting Called
- iOS 11 (GM) prompts at launch even though promptAtLaunch set to NO & Submit button fails HOT 8
- Crash when sending `window` message to `UIApplicationDelegate`
- 您好,为什么弃用不维护了啊? HOT 2
- iRate did not prompt for rating because the app was first used less than 10 days ago HOT 1
- SwiftPM Support / swift package init
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irate.