From 1433bd23becb9b1b644b36a90c3845c9b69ecf7b Mon Sep 17 00:00:00 2001 From: coneybeare Date: Tue, 23 Sep 2014 08:33:36 -0700 Subject: [PATCH] Created How to show different prompt on updated app rather than first version (markdown) --- ...t-on-updated-app-rather-than-first-version.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 How-to-show-different-prompt-on-updated-app-rather-than-first-version.md diff --git a/How-to-show-different-prompt-on-updated-app-rather-than-first-version.md b/How-to-show-different-prompt-on-updated-app-rather-than-first-version.md new file mode 100644 index 0000000..4ff9057 --- /dev/null +++ b/How-to-show-different-prompt-on-updated-app-rather-than-first-version.md @@ -0,0 +1,16 @@ +If you want display a slightly different prompt when asking users to re-rate after an update instead of the same initial copy, this is easily achievable with Armchair. You want to implement a `shouldPromptClosure` which will allow you to change the message based on whether or not the app was already rated, already declined or some other stat. Here is one way you could do this: + + Armchair.shouldPromptClosure({ (trackingInfo: ArmchairTrackingInfo) -> (Bool) in + // the trackingInfo.info dictionary has all the keys/value Armchair uses to determine whether or not to show a prompt + var ratedAnyVersion: NSNumber? = trackingInfo.info[ArmchairKey.RatedAnyVersion] as AnyObject? as? NSNumber + + if let rated = ratedAnyVersion { + if rated.boolValue { + // Edit Armchair for an update prompt instead of a first-time prompt + Armchair.reviewMessage("Please update...") + } + } + + // Return true to allow the prompt, false to stop the presentation. + return true + })