AppStoreReviewManager

Swift Swift Package Manager compatible

Request an App Store review on specified action count numbers.

How to use

Using AppStoreReviewManager is as simple as:

ASRManager.default.requestReviewIfAppropriate()

Call the above function to increase actions count and request review if review worthy numbers contain the new actions count.

Reset values

// reset action count
ASRManager.default.resetReviewWorthyActionsCount()

// reset last version when prompted
ASRManager.default.resetLastVersionPromptedForReview()

Get values

// get the amount of actions
ASRManager.default.reviewWorthyActionsCount

// get the version when last promted for a review
ASRManager.default.lastVersionPromptedForReview

Review worthy actions

// default implementation will print "[10, 25, 50, 100, 200, 400, 600, 1200]"
print(ASRManager.default.reviewWorthyActionsNumbers)

// get or set the collections of review worthy action numbers
ASRManager.default.reviewWorthyActionsNumbers = [ 11, 22, 33, 44 ]

Delay

Often its nice to have a delay for the request to appear. When user does a review worth action it’s smoother if waiting for some delay. Default implementation is 1.0 second.

// get or set the delay before a request appears (in sec)
ASRManager.default.delay = 1.2

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/lukasdanckwerth/AppStoreReviewManager.git", from: "1.0.0")
]

Requierments

  • iOS 10.3
  • Swift 5
  • StoreKit

GitHub

View Github