Skip to content

Instantly share code, notes, and snippets.

View psyked's full-sized avatar

James Ford psyked

View GitHub Profile
@psyked
psyked / RateMe.js
Created March 7, 2012 10:08 — forked from dawsontoth/app.js
"Rate my app in Appcelerator Titanium Mobile" as a commonJS module.
function RateMe(ios_url, goog_url, usecount) {
if(!Ti.App.Properties.hasProperty('RemindToRate')) {
Ti.App.Properties.setString('RemindToRate', 0);
}
var remindCountAsInt = parseInt(Ti.App.Properties.getString('RemindToRate'), 10);
var newRemindCount = remindCountAsInt += 1;
if(remindCountAsInt === -1) {
// the user has either rated the app already, or has opted to never be
// reminded again.