Merge pull request #95 from ari3l/master

Fix infinite prompts when using StoreKit prompt
This commit is contained in:
Matt Coneybeare
2017-05-12 10:43:25 -04:00
committed by GitHub

View File

@@ -1214,6 +1214,10 @@ open class Manager : ArmchairManager {
#if os(iOS)
if #available(iOS 10.3, *), useStoreKitReviewPrompt {
SKStoreReviewController.requestReview()
// Assume this version is rated. There is no API to tell if the user actaully rated.
userDefaultsObject?.setBool(true, forKey: keyForArmchairKeyType(ArmchairKey.RatedCurrentVersion))
userDefaultsObject?.setBool(true, forKey: keyForArmchairKeyType(ArmchairKey.RatedAnyVersion))
userDefaultsObject?.synchronize()
return
}
if (operatingSystemVersion >= 8 && usesAlertController) || operatingSystemVersion >= 9 {