Swift: SKStoreReviewController - how often can it be called? - ios

The documentation says that an app can ask a User three times per year via SKSToreReviewController to place a rating.
Most suggest to save a variable in UserDefaults and call the function after a couple of uses. What happens if you call the function more than three times per year? Will the App Store just ignore the calls and after a year asks for a rating again or will you get some kind of error?
And what happens if the app has been updated (ie. a jump from version 1.0 to version 2.0)? Will the 3 requests be reset?

In short, you choose the appropriate time to display the alert, but the system will decide whether to actually show the alert or not. So don't worry about "over-calling" as long as you don't call it as a response to user interaction.
Although you should call this method when it makes sense in the user experience flow of your app, the actual display of a rating/review request view is governed by App Store policy. Because this method may or may not present an alert, it's not appropriate to call it in response to a button tap or other user action.
Highlight mine.
https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview
As for your second question, the only reference I can find regarding how many times it might be displayed is "3 times per year". It doesn't mention 3 times per app version or update. Use this API wisely.

Related

Adding rating and review capability inside an app

I am using this SKStoreReviewController to add rating and review to my app. But there is one thing I am confused about.
As an example, lets say the popup will appear after 30 days. In the 30th day the popup will appear every time for one particular user or just once ?
Is Apple taking care to not show the popup to same user multiple times in a day or I have to add the logic inside code for myself ?
You can trigger when to show the Rating view by calling this method: requestReview()
However, it's not guaranteed that it will show/ask the user for rating. It's completely governed by apple. You can check lines from Apple docs related to the same.
Excerpt from Apple docs.
Although you should call this method when it makes sense in the user
experience flow of your app, the actual display of a rating/review
request view is governed by App Store policy. Because this method may
or may not present an alert, it's not appropriate to call it in
response to a button tap or other user action.
Apple is taking care of it. Have a look at requestReview() method of the SKStoreReviewController. A call to this method may or may not present an alert to review.
There is not much details provided by Apple for this. But in one of the docs Apple do quote that the developer should handle the flow and logic to display the popup. But again weather that popup is shown or not its upon Apple.
Apple Docs:
Although you should call this method when it makes sense in the user experience flow of your app, the actual display of a rating/review request view is governed by App Store policy. Because this method may or may not present an alert, it's not appropriate to call it in response to a button tap or other user action.
The following are some apparently useful points listed in this medium article(Though the source it mentions have no details of the sorts):
You should only call request review when it makes sense in the user experience flow of your app, and then call the method only after the user has demonstrated some engagements on an app.
You have no control over exactly what’s happening and the dialog displayed or its callbacks, that is determined entirely by the system.
The system may or may not show a rating prompt, it’s not appropriate to call the API in response to a button tap or other user action because it is not going to happen every time.
No matter how many times you call the API, the system will only show up to a maximum of 3 prompts to the same user in a 365-day period.
The App Store defaults to showing ratings and reviews only for your app’s most recent version.
The User can turn off this in settings.
Apple might mandate this flow in future.
Hope this helps.

How do you modify an app that's on the app store without making your users update the app?

I am working on an mobile app that requires me to change the text displayed either on a weekly or a monthly basis, but I don't want to require the users to have to update the app every day or every week in order to see the changes. I would love suggestions on how to do this.
As a high-level answer, check the device date and display the proper text, if it is fixed and known ahead of time.
If not, have a file or api call send down the information and the next date of when the server should be checked for the next set of data.

SKStoreReviewController requestReview() may or may not present and alert?

I'm taking a look at the new requestReview() API that uses SKStoreReviewController. The documents state:
"Although you should call this method when it makes sense in the user experience flow of your app, the actual display of a rating/review request view is governed by App Store policy. Because this method may or may not present an alert, it's not appropriate to call it in response to a button tap or other user action."
Does anyone have any experience using this API. What exactly are the factors that determine if the rating view is shown or not? I'm guessing it's not shown if called too frequently.. Anybody have any insight on this? Thanks!
You're right that it won't show if called too frequently.
SKStoreReviewController will only allow prompting a user to review your application 3 times at most, even if you ship more versions than that during the year.
There might be more restrictions beneath the surface as well.
Source: http://daringfireball.net/2017/01/new_app_store_review_features
According to iOS Human Interace Guildelines
The system automatically limits the display of the prompt to three occurrences per app within a 365-day period.

HealthKit requestAuthorizationToShareTypes once per day?

I was attempting to use apple's HealthKit authorization modal in my App's settings, to allow a user to toggle their info on/off for sharing. It automatically pops up the authorization screen. However it seems to only do it once and then never again. At least until 24 hours later maybe, where it will prompt again if needed.
Is this meant to be used similarly to PushMessage requests, where a user is prompted once and then not ever prompted again from the same request?
I'm skeptical to add this modal prompt in the App's initial load as it is quite intrusive as a full screen modal; even if called only once ever.
Basically the user suppose to see it once (as when asking to grant push notification permissions, or access to contacts).
I have found out that for each datatype you want to share with Health app (or read), you got one shot with the modal prompt. This prompt might be a bit tedious to the user as it shows the entire types your app ask for permissions (both read and write), and I assume this is why Apple said a best practice of HealthKit is to ask the entire permissions your app need at the same time (though some might argue with that in a matter of UX).
If you wish to ignore Apple suggestions of this best practice, you can ask for read/write permissions for each datatype separately - Doing so will result prompting that modal sheet each time you ask the permissions to a different type.
In the bottom line, this permissions sheet is meant (by Apple) to be shown to the user once. You can find a way to pass that limitation (yet for a limit amount of times - depends on the amount of datatypes available), but I won't recommend bypassing Apple's guidelines (it is never a good idea).
A trick to use is to modify the Share/write types in your authorization, this will require the user to look at it again, thus pop it up every time.

how often should i refresh my cache?

I'm writing the cache for an iOS app right now. I'm wondering how often i should refresh my cache. to give a little background, it's a weight loss app. what i'm working on right now, specifically, is a list of recipes. I pull the list of recipes from the server and display it in a table view. Obviously, i was going to make the list refresh when you pull down on the view controller. My question is, should i have it refresh the list every x number of days? or should it refresh every time the app is reopened? the list isnt expected to change more than once every 1 - 2 weeks, if that often. the user can also add their own recipes, so it could potentially change more often than that. is there a specific industry standard or protocol to follow for how often the cache should be refreshed?
Why don't you hook up your app with a Push Notification Service ? so incase there is a new recipe you could dispatch a push notification and when the user opens the app refresh your cache. That way you only refresh your cache when needed and also aids in better user experience. Here's a good tutorial on setting up a push notification service

Resources