File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
Sources/AppStoreReviewManager Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1- // swift-tools-version:5.5
1+ // swift-tools-version:5.7
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import PackageDescription
55
66let package = Package (
77 name: " AppStoreReviewManager " ,
8- platforms: [ . iOS( . v9 ) ] ,
8+ platforms: [ . iOS( . v11 ) ] ,
99 products: [
1010 // Products define the executables and libraries a package produces, and make them visible to other packages.
1111 . library(
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ An easy way to access reviews for your app instead of writing repetitive and red
55
66## Requirements
77
8- iOS 9 .0+, Swift 5.5 +
8+ iOS 11 .0+, Swift 5.7 +
99
1010
1111## Installation
@@ -14,7 +14,7 @@ iOS 9.0+, Swift 5.5+
1414
1515- Xcode > File > Swift Packages > Add Package Dependency
1616- Add ` https://github.com/Jinya/AppStoreReviewManager.git `
17- - Select "Exact Version " (recommend using the latest exact version)
17+ - Select "Up to Next Minor " (recommend using the latest version)
1818
1919
2020## How to Use
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import UIKit
88import StoreKit
99
1010@available ( iOS 9 . 0 , * )
11- public struct AppStoreReviewManager {
11+ public enum AppStoreReviewManager {
1212 /// Base URL string
1313 private static let base = " https://apps.apple.com/app "
1414
@@ -29,7 +29,7 @@ public struct AppStoreReviewManager {
2929 /// This is a convenient wrapper method for `SKStoreReviewController.requestReview()` and `SKStoreReviewController.requestReview(in: UIWindowScene)`.
3030 @available ( iOS 10 . 3 , * )
3131 public static func requestReview( ) {
32- let block = {
32+ func run ( ) {
3333 if #available( iOS 14 . 0 , * ) {
3434 guard let windowScene = UIApplication . shared. connectedScenes
3535 . first ( where: { $0. activationState == . foregroundActive } ) as? UIWindowScene
@@ -44,11 +44,9 @@ public struct AppStoreReviewManager {
4444 }
4545
4646 if Thread . isMainThread {
47- block ( )
47+ run ( )
4848 } else {
49- DispatchQueue . main. async {
50- block ( )
51- }
49+ DispatchQueue . main. async { run ( ) }
5250 }
5351 }
5452
You can’t perform that action at this time.
0 commit comments