geof-dev/nativephp-store-review
Composer 安装命令:
composer require geof-dev/nativephp-store-review
包简介
NativePHP Mobile plugin for native in-app store review prompts (iOS SKStoreReviewController & Android Play In-App Review)
README 文档
README
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
composer require geof-dev/nativephp-store-review
The service provider is auto-discovered.
Usage
use Nativephp\StoreReview\Facades\StoreReview; // Check if in-app review is available on this device if (StoreReview::isAvailable()) { StoreReview::requestReview(); }
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:
use Livewire\Attributes\On; #[On('native:Nativephp\StoreReview\Events\StoreReviewCompleted')] public function handleReviewCompleted($result, $id = null) { // $result — raw result payload from the native layer }
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.
geof-dev/nativephp-store-review 适用场景与选型建议
geof-dev/nativephp-store-review 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 04 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 geof-dev/nativephp-store-review 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 geof-dev/nativephp-store-review 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-11