Skip to content

Commit

Permalink
Support point argument
Browse files Browse the repository at this point in the history
  • Loading branch information
takecian committed Jul 4, 2024
1 parent b8ca82d commit 067429a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Demo/Demo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
SwiftRater.incrementSignificantUsageCount()
SwiftRater.incrementSignificantUsageCount(point: 1)
SwiftRater.check(host: self)

// If want to navigate app review page, use `rateApp()`.
Expand Down
10 changes: 3 additions & 7 deletions SwiftRater/SwiftRater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ import StoreKit
SwiftRater.shared.perform()
}

@objc public static func incrementSignificantUsageCount() {
UsageDataManager.shared.incrementSignificantUseCount()
@objc public static func incrementSignificantUsageCount(point: Int = 1) {
UsageDataManager.shared.incrementSignificantUseCount(point: point)
}

#if os(iOS)
Expand Down Expand Up @@ -324,11 +324,7 @@ import StoreKit
private func incrementUsageCount() {
UsageDataManager.shared.incrementUseCount()
}

private func incrementSignificantUseCount() {
UsageDataManager.shared.incrementSignificantUseCount()
}


#if os(iOS)
private func showRatingAlert(host: UIViewController?, force: Bool) {
NSLog("[SwiftRater] Trying to show review request dialog.")
Expand Down

0 comments on commit 067429a

Please sign in to comment.