diff --git a/Demo/Demo/ViewController.swift b/Demo/Demo/ViewController.swift index ddb2141..637fcd0 100644 --- a/Demo/Demo/ViewController.swift +++ b/Demo/Demo/ViewController.swift @@ -13,9 +13,7 @@ class ViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - SwiftRater.incrementSignificantUsageCount() - // If you want to meet the condition for testing purpose, use this. - // SwiftRater.debugMode = true + SwiftRater.incrementSignificantUsageCount(point: 1) SwiftRater.check(host: self) // If your want to show rating dialog manually, use `rateApp()`. diff --git a/README.md b/README.md index a3b30d1..111637a 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ You can set properties you want to apply. | :------------- |:-------------| | debugMode | Shows review request every time. Default false, **need to set false when you submit app to AppStore**. | | conditionsMetMode | Possible values: `.any`, `.all` (default)
Setting this to `.any` allows the prompt to be shown **when any one or more of your criteria have been met**. | -| showLaterButton | Show Later button in review request dialong, valid for iOS10.2 or before devices.| +| showLaterButton | Show Later button in review request dialog, valid for iOS10.2 or before devices.| | daysBeforeReminding | Days until reminder popup if the user chooses `rate later`, valid for iOS10.2 or before devices. | 2.Call `SwiftRater.check()` in `viewDidAppear` of ViewController where you want to show review request dialog. If conditions are met, SwiftRater will show review request popup. @@ -168,7 +168,7 @@ SwiftRater.daysBeforeReminding = 7 SwiftRater.appLaunched() ``` -If you wanted to show the rquest after a user performs 10 significant actions before 5 days or 5 uses have passed: +If you wanted to show the request after a user performs 10 significant actions before 5 days or 5 uses have passed: ``` SwiftRater.conditionsMetMode = .any diff --git a/SwiftRater.podspec b/SwiftRater.podspec index baa5a38..94d7342 100644 --- a/SwiftRater.podspec +++ b/SwiftRater.podspec @@ -8,9 +8,9 @@ Pod::Spec.new do |s| s.name = 'SwiftRater' - s.version = '2.1.2' + s.version = '2.1.3' s.summary = 'A utility that reminds your iPhone app users to review the app written in pure Swift.' - s.platform = :ios, '11.0' + s.platform = :ios, '12.0' # This description is used to generate tags and improve search results. # * Think: What does it do? Why did you write it? What is the focus? diff --git a/SwiftRater/SwiftRater.swift b/SwiftRater/SwiftRater.swift index 0d3f823..1618049 100644 --- a/SwiftRater/SwiftRater.swift +++ b/SwiftRater/SwiftRater.swift @@ -317,8 +317,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) @@ -489,11 +489,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.") diff --git a/SwiftRater/UsageDataManager.swift b/SwiftRater/UsageDataManager.swift index 55ea607..436d08f 100644 --- a/SwiftRater/UsageDataManager.swift +++ b/SwiftRater/UsageDataManager.swift @@ -177,8 +177,8 @@ class UsageDataManager: @unchecked Sendable { usesCount = usesCount + 1 } - func incrementSignificantUseCount() { - significantEventCount = significantEventCount + 1 + func incrementSignificantUseCount(point: Int = 1) { + significantEventCount = significantEventCount + point } func saveReminderRequestDate() {