Giter Club home page Giter Club logo

reviewkit's Introduction

ReviewKit Logo

ReviewKit

Request reviews only from users with enough recent positive activity and only at appropriate times.

Read the Introduction Article to learn how to best use ReviewKit in your app.

Requirements

  • Minimum deployment target iOS 11+, macOS 10.14+
  • Swift 5.8+ (Xcode 14.3+)

Usage

  1. Add ReviewKit to your app using SwiftPM:

    https://github.com/FlineDev/ReviewKit.git
    
  2. (Optional) Adjust the criteria by which app reviews are requested on app start (defaults to 3 positive events & expiration after 14 days):

    import ReviewKit
    // ...
    ReviewKit.criteria = ReviewCriteria(minPositiveEventsWeight: 5, eventsExpireAfterDays: 30)
  3. Determine common workflows in your app and when a user completes one of them, call this:

    ReviewKit.recordPositiveEventAndRequestReviewIfCriteriaMet()
  4. (Optional) Determine other activities that you think are positive experiences for your users. If they are in the middle of workflows, instead of the above call:

    ReviewKit.recordPositiveEvent()  // optionally, you can pass a custom `weight` parameter, defaults to 1
  5. (Optional) Get more reviews from users who tried your app at least once, add this to your app entry point:

    @AppStorage("appStarts")
    var appStarts: Int = 0

    And attach this modifier to your apps' root view:

    .onAppear {
       self.appStarts += 1
    
       if self.appStarts >= 2 {
          ReviewKit.recordPositiveEventAndRequestReviewIfCriteriaMet()
       }
    }

That's it โ€“ you have configured App Review requests for your app!

Notes

  • ReviewKit is using Apple's SKStoreReviewController API internally. That API already encapsulates some logic to make sure not to ask users too often.
  • That logic is turned off in DEBUG mode, so you might want to set ReviewKit.enabledInDebugBuilds = false once you've tested that everything works.
  • There's also a function requestReviewIfCriteriaMet() that does not record a positive event in case you need that.

Showcase

I extracted this library from and use it in these Indie apps (rate them with 5 stars to support me!):

App Icon App Name & Description Supported Platforms
TranslateKit: App Localizer
Simple drag & drop translation of String Catalog files with support for 4 machine translation services.
Mac
CrossCraft: Custom Crosswords
Create themed & personalized crosswords. Solve them yourself or share them to challenge others.
iPhone, iPad, Mac, Vision
FocusBeats: Pomodoro + Music
Deep Focus with proven Pomodoro method & select Apple Music playlists & themes. Automatically pauses music during breaks.
iPhone, iPad, Mac, Vision
Guided Guest Mode
Showcase Apple Vision Pro effortlessly to friends & family. Customizable, easy-to-use guides for everyone!
Vision
Posters: Discover Movies at Home
Auto-updating & interactive posters for your home with trailers, showtimes, and links to streaming services.
Vision

reviewkit's People

Contributors

flinedevpublic avatar jeehut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

reviewkit's Issues

[Feat] Minimum Time Before Requesting Review

Problem Statement

If a user is just checking my app out for the first time, I don't want to request a review from them yet.

Suggested Solution

I could set the threshold for events higher, but it would be better if I were able to set a minimum time after first install / first event in the queue before requesting a review.

Additional Considerations

You are already recording the time for the events, so adding a check for minimum time since the first event shouldn't be too difficult. Then it would just be a configuration option. I'd suggest the default be one day.

[Bug] Review request window opens behind app window when using Mac Catalyst

Steps to Reproduce:

  1. Build an iOS app on macOS using Mac Catalyst
  2. Use ReviewKit.recordPositiveEventAndRequestReviewIfCriteriaMet() in certain places

Expected Behavior:

When all criteria are met, the small review request window should appear in front of the app window.

Current Behavior:

The review request window appears behind the app window.

Environment

macOS 14.4.1
Xcode 15.3

Comment

#if os(macOS) does not capture Mac Catalyst, which is only captured by
#if targetEnvironment(macCatalyst)
Could it be that this must be considered in the function requestReviewIfCriteriaMet ?

[Feat] Delay After Threshold Crossed

Problem Statement

While having the criteria before requesting a review is good, it's also likely to interrupt the user while they are doing something within the app. For example, in my weather app, a positive criteria is selecting a day of the week to check the weather for. But having the review appear right after the user taps a day may be disruptive to their thought process.

Suggested Solution

Set a delay after the threshold is crossed before presenting the review dialog. For example, the framework could see that the threshold has been crossed, then wait 5 seconds before presenting the dialog. If the user does another positive event, that would reset the timer.

Additional Considerations

  • A possible good default value would be 5 seconds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.