定制 geof-dev/nativephp-store-review 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

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 true does 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 SKStoreReviewController from 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 geof-dev/nativephp-store-review 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 29
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-11