See: https://github.com/theappcapital/SiriusRating-Android for Android.
A non-invasive and friendly way to remind users to review and rate an iOS app.
- Supports 32 languages
- Unit tested
- Dark mode compatibility
- Supports SwiftUI and UIKit
- Configurable rating conditions
- Write your own rating conditions to further stimulate positive reviews.
- Modern, sleek design
- Non-invasive prompts
- Configurable recurring prompts with back-off factors
- Create custom prompt styles
- iOS 13.0+
Configure a SiriusRating shared instance, typically in your AppDelegate or your app's initializer.
In the application(_:didFinishLaunchingWithOptions:)
function in AppDelegate:
SiriusRating.setup()
For example:
//...
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//...
SiriusRating.setup()
return true
}
By default, the user will be prompted to rate the app when the following conditions are met:
- The app has been
installed for at least 30 days
, - The user has
opened the app at least 15 times
, and - The user has
completed 20 significant events
.
If the user selects 'Remind me later,' they will be prompted again after 7 days. If the user declines the prompt, they will be prompted again after 30 days, with a back-off factor of 2. This means that if the user declines a second time, they will be prompted again in 60 days, a third time in 120 days, and so on.
To integrate SiriusRating into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'SiriusRating'
To integrate SiriusRating into your Xcode project using Carthage, specify it in your Cartfile
:
github "theappcapital/SiriusRating-iOS"
dependencies: [
.package(url: "https://github.com/theappcapital/SiriusRating-iOS.git", .upToNextMajor(from: "1.0.8"))
]
A significant event defines an important event that occurred in your app. In a time tracking app it might be that a user registered a time entry. In a game, it might be completing a level.
SiriusRating.shared.userDidSignificantEvent()
SiriusRating will validate the conditions after each significant event and prompt the user if all conditions are satisfied.
To see how the request prompt will look like in your app simply use the following code.
// For test purposes only.
SiriusRating.shared.showRequestPrompt()
StyleOneRequestPromptPresenter (light, default) | StyleOneRequestPromptPresenter (dark, default) |
---|---|
StyleTwoRequestPromptPresenter (light) | StyleTwoRequestPromptPresenter (dark) |
---|---|
The rating conditions are used to validate if the user can be prompted to rate the app. The validation process happens after the user did a significant event (userDidSignificantEvent()
) or if configured when the app was opened. The user will be prompted to rate the app if all rating conditions are
satisfied (returning true
).
Rating Condition | Description |
---|---|
EnoughAppSessionsRatingCondition |
Validates whether the app has been launched or brought into the foreground a sufficient number of times. |
EnoughDaysUsedRatingCondition |
Validates whether the app has been in use for a sufficient duration (in days). |
EnoughSignificantEventsRatingCondition |
Validates whether the user has completed enough significant events. |
NotDeclinedToRateAnyVersionRatingCondition |
Validates that the user hasn’t declined to rate any version of the app. If declined, it checks whether enough time has passed since the initial decline before prompting again. |
NotPostponedDueToReminderRatingCondition |
Validates whether the user has opted to be reminded later. If so, it checks if the required number of days has passed to prompt again. |
NotRatedCurrentVersionRatingCondition |
Validates whether the user has already rated the current version of the app. The user won’t be prompted again if they’ve already rated this version. |
NotRatedAnyVersionRatingCondition |
Validates that the user hasn’t rated any version of the app. If the user has previously rated the app, it checks whether enough time has passed since their last rating before prompting again. |
SiriusRating.setup(
requestPromptPresenter: StyleTwoRequestPromptPresenter(),
debugEnabled: true,
ratingConditions: [
EnoughDaysUsedRatingCondition(totalDaysRequired = 0),
EnoughAppSessionsRatingCondition(totalAppSessionsRequired = 0),
EnoughSignificantEventsRatingCondition(significantEventsRequired = 5),
// Essential rating conditions below: Ensure these are included to prevent the prompt from appearing continuously.
NotPostponedDueToReminderRatingCondition(totalDaysBeforeReminding: 14),
NotDeclinedToRateAnyVersionRatingCondition(daysAfterDecliningToPromptUserAgain: 30, backOffFactor: 2.0, maxRecurringPromptsAfterDeclining: 2),
NotRatedCurrentVersionRatingCondition(),
NotRatedAnyVersionRatingCondition(daysAfterRatingToPromptUserAgain: 240, maxRecurringPromptsAfterRating: UInt.max)
],
canPromptUserToRateOnLaunch: true,
didOptInForReminderHandler: {
//...
},
didDeclineToRateHandler: {
//...
},
didRateHandler: {
//...
}
)
You can write your own rating conditions in addition to the current rating conditions to further stimulate positive reviews.
class GoodWeatherRatingCondition: RatingCondition {
private let weatherRepository: WeatherRepository
init(weatherRepository: WeatherRepository) {
self.weatherRepository = weatherRepository
}
func isSatisfied(dataStore: DataStore) -> Bool {
// Only show the rating prompt when it's sunny outside.
return self.weatherRepository.getWeather().isSunny
}
}
To make use of the new rating condition simply add it to list.
SiriusRating.setup(
ratingConditions: [
//...,
GoodWeatherRatingCondition(weatherRepository: WeatherDataRepository())
]
)
You can change the presenter to the style you wish.
SiriusRating.setup(
requestPromptPresenter: StyleTwoRequestPromptPresenter()
)
You can change the texts by giving the presenter a bundle that contains your custom localized strings.
SiriusRating.setup(
requestPromptPresenter: StyleOneRequestPromptPresenter(localizationsBundle: Bundle.main)
)
Then you can change the texts in your localizable strings file, for example in: Localizable.strings
.
// ...
"request_prompt_title" = "Rate %@";
"request_prompt_duration" = "(duration: less than 10 seconds)";
"request_prompt_description" = "If you enjoy using %@, would you mind taking a moment to rate it? Thanks for your support!";
"request_prompt_rate_button_text" = "Rate %@";
"request_prompt_dont_rate_button_text" = "No, thanks";
"request_prompt_opt_in_for_reminder_button_text" = "Remind me later";
SiriusRating will automatically use the global tint color.
UIView.appearance().tintColor = .red
Or you can set it manually.
SiriusRating.setup(
requestPromptPresenter: StyleOneRequestPromptPresenter(tintColor: .red)
)
SiriusRating will automatically use the app's display name in the localized texts. If you don't want to use this name you can set it manually.
SiriusRating.setup(
requestPromptPresenter: StyleOneRequestPromptPresenter(appName: "App Name")
)
SiriusRating is released under the MIT license. See LICENSE for details.