arashpayan/appirater — pull request #157 by phest (2013-12-11 03:48:19+00:00)
Title: More control to show prompt

To have a button that the user presses to rate the app, Appirater
provides `+rateApp`. But this triggers the review directly, which may
not be ideal for some UIs. The developer may want to display an
intermediary prompt - this prompt can be both informative to the user
and a confirmation step to go ahead and review. `+showPrompt` doesn't
fit the bill because it may not open the prompt.

I added `+forceShowPrompt:` for this use case. It accepts one argument
to show or hide the rate later button (if triggered by a button, the
developer will probably want to hide the rate later button; but some
may want to keep it in the case of using *both* `+forceShowPrompt:`
and the usual automatic Appirater mechanisms).

I also went ahead and created `+tryToShowPrompt`. It's the same as
`+showPrompt`, but I felt that `showPrompt` needed to be more
explanatory, as it may actually not show a prompt, and now that
`+forceShowPrompt:` exists, the distinction begs to be clearer.
`+showPrompt` still works, I moved it to `Deprecated`.

Here's the full list of changes:

- user facing:
- added: `+forceShowPrompt:`
- added: `+tryToShowPrompt`
- deprecated: `+showPrompt`
- inner workings:
- added: `-showRatingAlert:` (option to display rate later button)
- modified: `-showRatingAlert` (calls `showRatingAlert:true`)
- added: `-showPromptWithChecks:displayRateLaterButton:` *
- * used by `tryToShowPrompt` and `forceShowPrompt:`)