Download the PHP package geof-dev/nativephp-store-review without Composer
On this page you can find all versions of the php package geof-dev/nativephp-store-review. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geof-dev/nativephp-store-review
More information about geof-dev/nativephp-store-review
Files in geof-dev/nativephp-store-review
Package nativephp-store-review
Short Description NativePHP Mobile plugin for native in-app store review prompts (iOS SKStoreReviewController & Android Play In-App Review)
License MIT
Informations about the package nativephp-store-review
NativePHP Store Review
A NativePHP Mobile plugin to trigger the native in-app review prompt on iOS and Android — letting users rate your app without leaving it.
- iOS — uses
SKStoreReviewController - Android — uses the Play In-App Review API
Requirements
- PHP 8.2+
nativephp/mobile^3.0- iOS 15+ / Android 8.0+ (API 26)
Installation
The service provider is auto-discovered.
Usage
requestReview(): bool
Asks the OS to display the native review prompt. Returns true if the request was successfully dispatched to the system.
Important: returning
truedoes not mean the dialog was shown to the user. Both iOS and Android throttle how often the prompt appears (iOS limits it to ~3 times per 365-day window per app). The OS decides whether to actually display it — this is by design and cannot be overridden.
isAvailable(): bool
Returns true if the current platform supports in-app reviews. Use this to hide review CTAs on unsupported environments (e.g. running in a browser during development).
Listening for Events
The plugin dispatches a StoreReviewCompleted event when the native flow finishes:
Best Practices
Apple and Google both discourage prompting users at arbitrary moments. A few guidelines:
- Don't ask too early. Wait until the user has experienced the value of your app (completed a task, finished onboarding, used it several times).
- Never tie the prompt to a button labeled "Rate us". Apple's guidelines forbid triggering
SKStoreReviewControllerfrom an explicit user action — the system may ignore it. - Don't call it after an error or negative event.
- Don't call it repeatedly. The OS will silently suppress excess requests; spamming it won't help.
See Apple's HIG on Ratings and Reviews for more.
Testing in Development
- iOS Simulator / Debug builds — the dialog appears every time (no throttling), but submissions are not sent.
- TestFlight / sideloaded builds — the prompt does not appear. You must test on a production build from the App Store.
- Android — use a FakeReviewManager for local testing; production requires an app published to the Play Store.
License
MIT © Geoffrey B.