Ask the operating system to show the App Store or Google Play rating prompt right inside your app, without sending the user to the store. Render the signal on any page where a review would be welcome, like a confirmation screen after someone finishes something worthwhile.
Works in both Normal Mode and Advanced Mode with the same helper.
Add native_review_tag to a page. When the page loads, the app asks the system to request a rating.
<%# app/views/orders/show.html.erb %>
<%= native_review_tag %>
<h1>Thanks for your order!</h1>
import { NativeReview } from "@ruby-native/react"
export default function Show() {
return (
<>
<NativeReview />
<h1>Thanks for your order!</h1>
</>
)
}
<script setup>
import { NativeReview } from "@ruby-native/vue"
</script>
<template>
<NativeReview />
<h1>Thanks for your order!</h1>
</template>
The helper renders a hidden signal element. Place it in the <body>, not the <head>.
Request a review from client-side code without a page load, like after a Turbo Stream marks a task complete:
window.RubyNative?.requestReview()
window.RubyNative is undefined in a browser, so the ?. makes the call a no-op on the web.
You are asking the operating system to consider showing the prompt. It does not always show one. Apple and Google both throttle these requests heavily (Apple limits them to a few times per year per device), so you cannot force the prompt to appear and cannot rely on it showing on any given page load.
Because of the throttling, it is safe to render native_review_tag on any page where a review would be welcome. The system will quietly ignore the request when it decides not to ask.
The prompt never appears in builds that are not distributed through the store:
It is also automatically suppressed during App Store and Google Play screenshot runs, so the rating dialog never appears in your captured screenshots.