← Back to Docs
  • index.html
  • Clayground
  • Clayground.Ios
  • AppReviewController
  • Clayground 2025.2
  • AppReviewController QML Type

    Smart App Store review prompt controller for engaged users. More...

    Import Statement: import Clayground.Ios

    Properties

    Methods

    Detailed Description

    AppReviewController ensures review prompts are shown only to engaged users by tracking active time and enforcing cooldown periods. This helps maximize positive reviews while respecting Apple's guidelines.

    Features:

    Example usage:

    import Clayground.Ios
    import Clayground.Storage
    
    ApplicationWindow {
        KeyValueStore { id: appStorage }
    
        AppReviewController {
            id: reviewController
            storage: appStorage
            maxPromptCount: 3
            cooldownDays: 14
            activeMinutesBtwnPrompts: 30
        }
    
        // Call at natural break points (level complete, etc.)
        onLevelCompleted: reviewController.showReviewPromptOnDemand()
    }

    See also ClayIos.

    Property Documentation

    activeMinutesBtwnPrompts : int

    Minimum active minutes required before showing prompts.

    The user must spend this many active minutes before the first prompt, and additional time for subsequent prompts. Defaults to 30 minutes.


    cooldownDays : int

    Minimum days between review prompts.

    Defaults to 14 days.


    maxPromptCount : int

    Maximum number of review prompts to show.

    Defaults to 3, matching Apple's yearly limit.


    storage : KeyValueStore [required]

    Storage backend for persisting review prompt state.

    This property is required and must be set to a valid KeyValueStore.


    Method Documentation

    bool reviewPromptConditionsMet()

    Checks if conditions for showing a review prompt are met.

    Returns true if:


    void showReviewPromptOnDemand()

    Shows the review prompt if conditions are met.

    Call this at natural break points in your app (level complete, successful action, etc.). The prompt will only appear if reviewPromptConditionsMet() returns true.