Skip to content

Commit

Permalink
Merge pull request #6 from kf99916/master
Browse files Browse the repository at this point in the history
Return the result of check()
  • Loading branch information
takecian authored Dec 15, 2017
2 parents 943a2e1 + 1b1d131 commit 93c77ad
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions SwiftRater/SwiftRater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,14 @@ import StoreKit
UsageDataManager.shared.incrementSignificantUseCount()
}

public static func check() {
if UsageDataManager.shared.ratingConditionsHaveBeenMet {
SwiftRater.shared.showRatingAlert()
@discardableResult
public static func check() -> Bool {
guard UsageDataManager.shared.ratingConditionsHaveBeenMet else {
return false
}

SwiftRater.shared.showRatingAlert()
return true
}

public static func rateApp() {
Expand Down

0 comments on commit 93c77ad

Please sign in to comment.