A modern utility that reminds your iOS app's users to review the app in a non-invasive way.

Overview

SiriusRating

Swift Platforms CocoaPods Compatible Carthage Compatible Swift Package Manager

github-banner

A modern utility that reminds your iOS app's users to review the app in a non-invasive way.

Features

  • SwiftUI and UIKit support
  • Configurable rating conditions
  • Write your own rating conditions to further stimulate positive reviews.
  • Modern design
  • Non-invasive approach
  • Specification pattern used to build the rating conditions
  • Recurring prompts that are configurable using back-off factors
  • No need to reset usage trackers each app version
  • Option to create your own prompt style
  • Unit tested rating conditions
  • Show prompt even while dismissing view controllers

Requirements

  • Xcode 11.1+
  • iOS 13.0+

Setup

Configure a SiriusRating shared instance, typically in your App's initializer or app delegate's application(_:didFinishLaunchingWithOptions:) method:

Simple One-line Setup

SiriusRating.setup()

By default the following rating conditions are used:

Default rating conditions
EnoughDaysUsedRatingCondition(totalDaysRequired: 30)
EnoughAppSessionsRatingCondition(totalAppSessionsRequired: 15)
EnoughSignificantEventsRatingCondition(significantEventsRequired: 20)
NotPostponedDueToReminderRatingCondition(totalDaysBeforeReminding: 7)
NotDeclinedToRateAnyVersionRatingCondition(daysAfterDecliningToPromptUserAgain: 30, backOffFactor: 2.0, maxRecurringPromptsAfterDeclining: 2)
NotRatedCurrentVersionRatingCondition()
NotRatedAnyVersionRatingCondition(daysAfterRatingToPromptUserAgain: 240, maxRecurringPromptsAfterRating: UInt.max)

Custom Configuration

SiriusRating.setup(
    requestPromptPresenter: StyleTwoRequestPromptPresenter(),
    debugEnabled: true,
    ratingConditions: [
        EnoughDaysUsedRatingCondition(totalDaysRequired: 14),
        EnoughAppSessionsRatingCondition(totalAppSessionsRequired: 20),
        EnoughSignificantEventsRatingCondition(significantEventsRequired: 30),
        // Important rating conditions, do not forget these:
        NotPostponedDueToReminderRatingCondition(totalDaysBeforeReminding: 14),
        NotDeclinedToRateAnyVersionRatingCondition(daysAfterDecliningToPromptUserAgain: 30, backOffFactor: 2.0, maxRecurringPromptsAfterDeclining: 3),
        NotRatedCurrentVersionRatingCondition(),
        NotRatedAnyVersionRatingCondition(daysAfterRatingToPromptUserAgain: 240, maxRecurringPromptsAfterRating: UInt.max)
    ],
    canPromptUserToRateOnLaunch: true,
    didOptInForReminderHandler: {
        // analytics.track(.didOptInForReminderToRateApp)
    },
    didDeclineToRateHandler: {
        // analytics.track(.didDeclineToRateApp)
    },
    didRateHandler: {
        // analytics.track(.didRateApp)
    }
)

Usage

Significant event

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()

Test request prompt

To see how the request prompt will look like in your app simply use the following code.

// For test purposes only.
SiriusRating.shared.showRequestPrompt()

Rating conditions

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()). The user will be prompted to rate the app if all rating conditions are satisfied (returning true).

Rating conditions Description
EnoughAppSessionsRatingCondition The rating condition that validates if the app has been launched or brought into the foreground enough times.
EnoughDaysUsedRatingCondition The rating condition that validates if the app has been used long enough.
EnoughSignificantEventsRatingCondition The rating condition that validates whether the user has done enough significant events.
NotDeclinedToRateAnyVersionRatingCondition The rating condition that validates that the user didn't decline to rate a version of the app. If the user did decline to rate the app, validate if we can show the prompt again by checking the number of days that have passed after the user's initial decline.
NotPostponedDueToReminderRatingCondition The rating condition that validates if the user didn't decline the current version of the app. With this condition we do not want to prompt the user to rate the app again if it declined to rate the current version of the app.
NotPostponedDueToReminderRatingCondition The rating condition that validates if the prompt was not postponed due an opted-in reminder. If the user did opt-in for a reminder, it will check if the total number of days have passed to show the prompt again.
NotRatedCurrentVersionRatingCondition The rating condition that checks if the user didn't already rate the current version of the app. We do not want to prompt the user to rate the app again if it already rated this version of the app.
NotRatedAnyVersionRatingCondition The rating condition that validates that the user didn't rate any version of the app. If the user did rate the app, validate if we can show the prompt again by checking the number of days that have passed since the user's rated last.

Custom rating conditions

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())
    ]
)

Customization

Presenters

StyleOneRequestPromptPresenter (default) StyleTwoRequestPromptPresenter
Style One Style Two

You can change the presenter to the style you wish.

SiriusRating.setup(
    requestPromptPresenter: StyleTwoRequestPromptPresenter()
)

You can even create your own presenter by extending from RequestPromptPresenter.

class YourCustomStyleRequestPromptPresenter: RequestPromptPresenter {
    
    func show(didAgreeToRateHandler: (() -> Void)?, didOptInForReminderHandler: (() -> Void)?, didDeclineHandler: (() -> Void)?) {
        // Your implementation here. Make sure you call the handlers.
    }
    
}

And implement it as follows.

SiriusRating.setup(
    requestPromptPresenter: YourCustomStyleRequestPromptPresenter()
)

Change texts

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";

Change tint color

SiriusRating will automatically use the global tint color.

UIView.appearance().tintColor = .red

Or you can set it manually.

SiriusRating.setup(
    requestPromptPresenter: StyleOneRequestPromptPresenter(tintColor: .red)
)

Change app name

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")
)

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SiriusRating into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SiriusRating'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate SiriusRating into your Xcode project using Carthage, specify it in your Cartfile:

github "theappcapital/SiriusRating"

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding SiriusRating as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/theappcapital/SiriusRating.git", .upToNextMajor(from: "1.0.0"))
]

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate SiriusRating into your project manually.

License

SiriusRating is released under the MIT license. See LICENSE for details.

You might also like...
A non gesture blocking, non clipping by default custom scroll view implementation with example code

A non gesture blocking, non clipping by default custom scroll view implementation with example code

OpenSwiftUIViews - A non gesture blocking, non clipping by default custom scroll view implementation with example code.

OpenSwiftUIViews - A non gesture blocking, non clipping by default custom scroll view implementation with example code.

A utility application to capture and review search results from Swift Package Index.

SPISearch An app (macOS & iOS) to explore the search results from Swift Package Index. Testflight Links: SPIIndex (iOS and macOS apps) Search Ranking

Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.
Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.

GuillotineMenu.swift Inspired by this project on Dribbble Also, read how it was done in our blog Requirements iOS 8.0+ Xcode 10 Swift 5.0 (v 4.1+) Swi

Block nags to accept cookies and privacy invasive tracking in Safari
Block nags to accept cookies and privacy invasive tracking in Safari

Hush Block nags to accept cookies and privacy invasive tracking in Safari Iā€™d recommend Hush to anyone who uses Safari ā€“ John Gruber, Daring Fireball

Since Facebook introduced reactions in 2016, it became a standard in several applications as a way for users to interact with content. ReactionButton is a control that allows developers to add this functionality to their apps in an easy way. āœØ An elegant way to guide your beloved users in iOS apps - Material Showcase.
āœØ An elegant way to guide your beloved users in iOS apps - Material Showcase.

Material Showcase for iOS An elegant and beautiful tap showcase view for iOS apps based on Material Design Guidelines. Requirement iOS 10.0+ Swift 4.2

Swift Apps in a Swoosh! A modern framework for creating iOS apps, inspired by Redux.
Swift Apps in a Swoosh! A modern framework for creating iOS apps, inspired by Redux.

Katana is a modern Swift framework for writing iOS applications' business logic that are testable and easy to reason about. Katana is strongly inspire

Swift Apps in a Swoosh! A modern framework for creating iOS apps, inspired by Redux.
Swift Apps in a Swoosh! A modern framework for creating iOS apps, inspired by Redux.

Katana is a modern Swift framework for writing iOS applications' business logic that are testable and easy to reason about. Katana is strongly inspire

Modern-collection-view - Modern collection view for swift

Modern collection view Sample application demonstrating the use of collection vi

Appstore-Review-Guidelines - A curated list of guideline which has to be taken care before submitting your application to Appstore.

Appstore Review Guidelines The App Review Guidelines provide rules and examples across a range of topics, including user interface design, functionali

Zilla connect is an easy, fast and secure way for your users to buy now and pay later from your app

Zilla Checkout iOS SDK Zilla connect is an easy, fast and secure way for your us

Swift-Misc-Utility - Taking the misc out of General Utility so that General only defines the namespace

Swift-Misc-Utility Everything extra that used to be in Swift-General-Utility has

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

This is a Review posting app that let user find interesting places near them
This is a Review posting app that let user find interesting places near them

ColorMatchTabs Inspired by this project on Dribbble Also, read how it was done in our blog Installation CocoaPods pod 'ColorMatchTabs' Carthage github

In-app design review tool to inspect measurements, attributes, and animations.
In-app design review tool to inspect measurements, attributes, and animations.

Hyperion Hyperion - In App Design Review Tool What is it? Hyperion is a hidden plugin drawer that can easily be integrated into any app. The drawer si

Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request.
Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request.

Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request. This is based on the Medium post by Cluster describing the different ways to ask for iOS permissions (https://medium.com/p/96fa4eb54f2c).

šŸŽ An App to check whether a non-App Store app is in App Store.
šŸŽ An App to check whether a non-App Store app is in App Store.

AppStorify šŸŽ An App to check whether a non-App Store app is in App Store. Benfits Use App Store's upgrade mechanism instead of app's. App Store apps

Push notifications allow developers to reach users, even when users aren't actively using an app!
Push notifications allow developers to reach users, even when users aren't actively using an app!

Push notifications allow developers to reach users, even when users aren't actively using an app! With the latest update of iOS Apple provide very useful extensions which are user-friendly. In this tutorial, I am going to share the configuration, set up of Notification with the media attachments like.

Owner
The App Capital
The App Capital collaborates with leading brands, create its own products from scratch and sets up ventures with external partners.
The App Capital
An emoji-liked rating view for iOS, implemented in Swift3.

TTGEmojiRate An emoji-liked rating view for iOS, implemented in Swift3. Android version: PeterSmileRate by SilicorniO. Great work ! :) Inspired by Rat

zekunyan 289 Jun 13, 2022
StarryStars is iOS GUI library for displaying and editing ratings

StarryStars StarryStars is iOS GUI library for displaying and editing ratings Features StarryStars' RatingView is both IBDesignable and IBInspectable

Peter Prokop 174 May 28, 2022
A star rating control for iOS/tvOS written in Swift

Cosmos, a star rating control for iOS and tvOS This is a UI control for iOS and tvOS written in Swift. It shows a star rating and takes rating input f

Evgenii Neumerzhitckii 2k Sep 24, 2022
Simple star rating view for iOS written in Objective-C

HCSStarRatingView HCSStarRatingView is a UIControl subclass to easily provide users with a basic star rating interface. It supports all device resolut

Hugo Sousa 1.3k Sep 11, 2022
A utility that reminds your iPhone app's users to review the app written in pure Swift.

SwiftRater SwiftRater is a class that you can drop into any iPhone app that will help remind your users to review your app on the App Store/in your ap

Takeshi Fujiki 284 Sep 1, 2022
Appirater - A utility that reminds your iPhone app's users to review the app.

Introduction Appirater is a class that you can drop into any iPhone app (iOS 4.0 or later) that will help remind your users to review your app on the

Arash Payan 4.7k Sep 26, 2022
Review page interaction - handy and pretty way to ask for review.

RPInteraction Overview Review page interaction - handy and pretty way to ask for review. Inspired by dribbble shot. Requirements iOS8 Installation RPI

Nurdaulet Bolatov 27 Jul 16, 2021
Review page interaction - handy and pretty way to ask for review

RPInteraction Overview Review page interaction - handy and pretty way to ask for review. Inspired by dribbble shot. Requirements iOS8 Installation RPI

Nurdaulet Bolatov 27 Jul 16, 2021
An app to detect invasive species to protect endangered apps

[Blair Hacks '22 - Best Environment Submission] An app to detect invasive species to protect endangered apps.

Anish 5 Feb 28, 2022
A framework to provide logic designed to prompt users at the ideal moment for a review of your app/software

ReviewKit ReviewKit is a Swift package/framework that provides logic designed to prompt users at the ideal moment for a review of your app. At a basic

Simon Mitchell 25 Jun 7, 2022