承接 geof-dev/nativephp-store-review 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

geof-dev/nativephp-store-review

最新稳定版本:v1.0.3

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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固