From 6ef0ad481101989f9add4d77c11995c46b57b816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjarte=20Skj=C3=B8restad?= Date: Mon, 21 Dec 2015 11:13:39 +0100 Subject: [PATCH 1/2] Made ratingConditionsHaveBeenMet() public. --- Source/Armchair.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Armchair.swift b/Source/Armchair.swift index 93631f5..e23046b 100644 --- a/Source/Armchair.swift +++ b/Source/Armchair.swift @@ -472,6 +472,13 @@ public func showPrompt(shouldPrompt: ArmchairShouldPromptClosure) { Manager.defaultManager.showPrompt(shouldPrompt) } +/** + Returns true if rating conditions have been met already and rating prompt is likely to be shown. + */ +public func ratingConditionsHaveBeenMet() -> Bool { + return Manager.defaultManager.ratingConditionsHaveBeenMet() +} + // MARK: Misc /* * This is the review URL string, generated by substituting the appID, affiliate code From 8e747575a59bc4ff7fafbdd206e300b5d9edec43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjarte=20Skj=C3=B8restad?= Date: Tue, 22 Dec 2015 08:34:28 +0100 Subject: [PATCH 2/2] Updated readme for ratingConditionsHaveBeenMet. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7a26b16..48948dc 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,10 @@ The `reviewURLString()` function is the review URL string, generated by substitu Armchair.rateApp() +`ratingConditionsHaveBeenMet()` function is returning true if conditions to show rating has been met. + + Armchair.ratingConditionsHaveBeenMet() -> Bool + ##### iOS Only Functions `closeModalPanel()` tells Armchair to immediately close any open rating modal panels for instance, a `SKStoreProductViewController`.