Compose Multiplatform-first in-app review prompts for Android (Google Play) and iOS (App Store).
Neither Google Play's in-app review API nor SKStoreReviewController guarantees the dialog
is shown, or that the user actually submits a review — both platforms apply their own
frequency quota internally. This library does not pretend otherwise: requestReview()
returns a ReviewResult that
only ever confirms the request was accepted, never that a review was written.
| Platform | Backend | Min OS |
|---|---|---|
| Android | Google Play In-App Review API | API 24+ |
| iOS | SKStoreReviewController |
iOS 14+ |
gradle/libs.versions.toml:
[libraries]
in-app-review = { module = "dev.ynagai.inappreview:in-app-review-kotlin", version = "0.1.0" }build.gradle.kts:
kotlin {
sourceSets {
commonMain.dependencies {
implementation(libs.inAppReview)
}
}
}@Composable
fun WorkoutSummaryScreen() {
val reviewManager = rememberInAppReviewManager()
val scope = rememberCoroutineScope()
Button(onClick = {
scope.launch { reviewManager.requestReview() }
}) {
Text("Finish")
}
}Call requestReview() after a moment of genuine engagement (a completed task, not a raw
button tap) — never on first launch, and never gate it behind a "would you rate us 5 stars?"
pre-question. Apple limits the dialog to at most 3 prompts per user per 365 days regardless
of how often you call it; Google gives no guarantee at all.
Neither platform's real dialog is testable in a debugger or simulator/emulator in the way
you'd expect (Android requires an internal test track; iOS always shows the dialog in debug
builds but ignores calls from TestFlight). Use FakeInAppReviewManager to exercise your
call-site logic without depending on either:
val reviewManager: InAppReviewManager =
if (isDebug) FakeInAppReviewManager() else rememberInAppReviewManager()Apache License 2.0, see LICENSE.