Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bbc6bae9/request-review

一行代码接入AppStore评分弹窗
https://github.com/bbc6bae9/request-review

Last synced: about 2 months ago
JSON representation

一行代码接入AppStore评分弹窗

Awesome Lists containing this project

README

        

# RequestReview

## Introduction

One line of code to add AppStore user review Alert.

(1) Introduce frequency control mechanism to avoid disturbing users. Up to 3 times per year. https://developer.apple.com/cn/app-store/ratings-and-reviews/

(2) When the user tries to triggers the alert 10 times, the review alert will appear. Support for specifying the strategy (counting when SwiftUI.View disappears or appears).

## Usage

`SystemPlayerView` accumulates `10` disappearances (i.e. after the user watches 10 videos), triggering the review alert.

```Swift
SystemPlayerView()
.requestReviewIfNeeded()
```

```
SystemPlayerView()
.requestReviewIfNeeded(strategy: .disappear)
```

`SystemPlayerView` accumulates `10` appearances, triggering the review alert.

```Swift
SystemPlayerView()
.requestReviewIfNeeded(strategy: .appear)
```