SmartRate 0.1.3

SmartRate 0.1.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2020
SPMSupports SPM

Maintained by Igor Korolev.



SmartRate 0.1.3

  • By
  • korrolion

SmartRate

Ask your users to make a review only when they are happy.

This pod will help you to implement your complex logic of doing this.

You can set any sequence of actions.

//Configure SmartRate
SMBlocker.shared.minTimeAfterInstalled = 60 //Will not fire 60 seconds after first launch
SMBlocker.shared.minTimeAfterLaunch = 10 //Will not fire 10 seconds after launch
SMBlocker.shared.minTimeAfterFire = 60 //Will not fire 60 seconds after fire 😀
SMBlocker.shared.showRatingForEveryVersion = true //Will reset block if the app version will change

//Create triggers for SmartRate
let countTrigger = SMTriggerCounterType(notificationName: ViewController.duplicateActionNotificationName, repeatTimes: 4, uniqName: "press4TimesTrigger")
//For every trigger you can provide custom fire function, or use default
countTrigger.customFireCompletion = {
    if #available(iOS 10.3, *) {
        SKStoreReviewController.requestReview()
    }
}
//Will fire on 4-th button press
SMTriggersStore.shared.addTrigger(countTrigger)

let chainTrigger = SMTriggerChainType(notificationNames: [
        ViewController.step1NotificationName, //provide sequence of steps
        ViewController.step2NotificationName,
        ViewController.step3NotificationName,
    ],
    breakNotificationName: ViewController.breakNotificationName, //You can break chain on any other action, or set nil
    uniqName: "pressButtons123Trigger"
    )
//Will fire after correct sequence of 3 steps. Will not fire if sequence will be broken
SMTriggersStore.shared.addTrigger(chainTrigger)

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

SmartRate is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SmartRate"

License

SmartRate is available under the MIT license. See the LICENSE file for more info.