mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-04-17 22:19:44 +02:00
1
Show Different Text for Updates
coneybeare edited this page 2014-09-23 08:35:37 -07:00
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
})
