Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bbc6bae9/request-review
一行代码接入AppStore评分弹窗
https://github.com/bbc6bae9/request-review
Last synced: about 2 months ago
JSON representation
一行代码接入AppStore评分弹窗
- Host: GitHub
- URL: https://github.com/bbc6bae9/request-review
- Owner: BBC6BAE9
- License: mit
- Created: 2024-08-12T13:40:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-12T13:56:01.000Z (5 months ago)
- Last Synced: 2024-11-25T04:07:22.495Z (about 2 months ago)
- Language: Swift
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)
```