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 + })