ReviewKit

1.1.0

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

What's New

2024-01-01T11:21:20Z

More flexibility with standalone requestReviewIfCriteriaMet() & ReviewKit.enabledInDebugBuilds = false.

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

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.

Showcases

I extracted this library from and use it directly in the following apps (check them out to support me!):

License

This library is released under the MIT License. See LICENSE for details.

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Dec 18 2024 05:42:35 GMT-1000 (Hawaii-Aleutian Standard Time)