AskForReview

public final class AskForReview : NSObject

Manages when to ask the user for an app review. Relies on SKStoreReviewController.requestReview to do the actual review prompt, but makes sure that the interval between asks is reasonable and within App Store policy.

  • Class method that fires a notification to ask for a review check. If properly initialized, there should be an instance of AskForReview around that is listening for the notification and will perform the actual review request.

    Declaration

    Swift

    public static func maybe()
  • Construct new (sole) instance

    Declaration

    Swift

    public init(isMain: Bool)

    Parameters

    isMain

    true if running inside app (vs AUv3 extension)

  • Ask user for a review. Whether the ask actually happens depends on when this method is called:

    • must be at least 14 days since the app was first launched
    • must be at least 2 months since the last review request

    Version

    version of the app must be different than the last version

    Declaration

    Swift

    public func ask()