How to request users to review your SwiftUI app
July 2, 2025·2 min read·by dockui

Starting in iOS 16, SwiftUI gives us a built-in way to request a review using the requestReview environment value from StoreKit. It's super easy to implement, and Apple takes care of the UI for you.
Step 1: Import StoreKit
You’ll need this to access the review functionality.
Code Snippet
Step 2: Use requestReview in Your View
Here’s the simplest setup:
Code Snippet
That’s it — when this view appears, iOS will try to show the rating prompt.
Hold On, There's a Catch...
Even if you call requestReview(), the popup might not actually show. That’s because Apple decides when it’s appropriate, with some of these rules:
- If the user hasn't rated your app before, it can show the prompt up to 3 times a year.
- If the user has rated your app, the prompt can show only if it’s a new app version and 365 days have passed since their last review.
- Sometimes, even if those rules are met, the prompt still won’t show — Apple has some hidden logic for keeping things user-friendly.
⚠️ Important: Don’t trigger this after a button tap or login. Apple could reject your app. Instead, call it after meaningful user interaction.
When’s the Best Time to Ask?
You want to ask for reviews when the user is likely feeling good about your app. Here are some good moments:
- After they’ve used your app a few times.
- When they complete something important (like finishing a task or leveling up).
- If they keep coming back — that’s a great signal they’re enjoying it.
Here's an example with some logic baked in:
Code Snippet
This way, you’re asking for a review at the right moment — not just whenever the app opens.
Final Thoughts
Reviews are important, but don’t overdo it. If your app brings value, people will be happy to leave feedback — you just have to ask at the right time. Hope this helps!
Happy coding 🙌
Code copied to clipboard!