Skip to content

Commit

Permalink
Merge branch 'release/v1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
pushandplay committed Oct 26, 2014
2 parents a60ce2c + bdf6311 commit 80e25eb
Show file tree
Hide file tree
Showing 27 changed files with 15,162 additions and 795 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.DS_Store
tmp
AppRateDemoProject
AppRateDemoProject
www_app
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
SHELL = /bin/sh



DEMO_APP_TITLE = AppRateDemoProject
DIR_SRC = ./www_src
DIR_BUILD = ./www
DIR_DEMO = ../AppRateDemoProject
DIR_DEMO = ../$(DEMO_APP_TITLE)

.PHONY: all prepare coffee clean app_prepare
.PHONY: all prepare coffee clean app_prepare docs

all: prepare coffee clean app_prepare
release: all compress
Expand Down Expand Up @@ -37,11 +37,12 @@ compress:
app:
@echo "\033[32mCreating demo project...\033[0m"
@rm -rf $(DIR_DEMO) && mkdir $(DIR_DEMO)
@cordova create $(DIR_DEMO) org.pushandplay.cordova.AppRateDemoProject AppRateDemoProject
@cordova create $(DIR_DEMO) org.pushandplay.cordova.$(DEMO_APP_TITLE) $(DEMO_APP_TITLE) --link-to=www_app
@#cd $(DIR_DEMO) && cordova plugins add https://github.com/pushandplay/cordova-plugin-apprate.git
@cd $(DIR_DEMO) && cordova plugins add ../cordova-plugin-apprate
@cd $(DIR_DEMO) && cordova platform add ios
@cd $(DIR_DEMO) && cordova prepare
@find $(DIR_DEMO) -name "$(DEMO_APP_TITLE).xcodeproj" -exec open {} \;


app_prepare:
Expand All @@ -56,5 +57,12 @@ app_install:
@cd $(DIR_DEMO) && cordova run --device android


docs:
@rm -rf docs
@#cd $(DIR_SRC) && docco -o ../docs ./*.coffee
@cd $(DIR_SRC) && codo -o ../docs ./*.coffee
@#cd $(DIR_SRC) && coffeedoc -o ../docs ./*.coffee


publish:
@plugman publish ./
150 changes: 74 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,117 +2,115 @@

This plugin provide the rate this app functionality into your Cordova/Phonegap application<br>

Need help for translations: [https://crowdin.net/project/apprate-cordovaphonegap-plugin](https://crowdin.net/project/apprate-cordovaphonegap-plugin)

Issues list and features requests [here](https://github.com/pushandplay/cordova-plugin-apprate/issues?state=open)



[Donate with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=MS8RQAS2NVVQW&lc=RU&item_name=github%2ecom&item_number=cordova%2dplugin%2dapprate&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)





<img src="https://dl.dropboxusercontent.com/u/26238/Cordova/Plugins/AppRate/preview_iPad.png" width="100%" alt="Preview iPad"/>

## Supported platforms ##

+ iOS
+ Android
+ Blackberry 10 (not tested)
+ Blackberry (experimental)
+ Windows8 (experimental)

## Requirements ##

Phonegap / Cordova 3.0.0 or later

## Installation ##

+ Install from github repository:
+ From github repository:

cordova plugins add https://github.com/pushandplay/cordova-plugin-apprate.git
+ Install from apache cordova plugins registry:
+ From apache cordova plugins registry:

cordova plugins add org.pushandplay.cordova.apprate
+ For installation from phonegap build add the following to your config.xml:
+ From phonegap build add the following to your config.xml:

<gap:plugin name="org.pushandplay.cordova.apprate" />

## Customization and usage ##

#### Simple call ####
#### Note ####
All %@ patterns in customLocale object will be automatically replaced to your application title

navigator.apprate.setup(myPrefObj);
navigator.apprate.promptForRating();
#### Available setup properties: ####

{
useLanguage: {String} default locale (default: "en")
displayAppName: {String} Your app name (default: Your native app name)
usesUntilPrompt: {Integer} Show promt message after launches (default: 3)
customLocale: {Object} Custom locale object (default: not set)
appStoreAppURL:
ios: {String} App url in AppStore (default: not set)
android: {String} App url in GooglePlay (default: not set)
blackberry: {String} (default: not set)
}
#### Available preferences options ####

useLanguage {String} null - custom BCP 47 language tag
displayAppName {String} '' - custom application title
promptAgainForEachNewVersion {Boolean} true - show dialog again when application version will be updated
usesUntilPrompt {Integer} 3 - count of runs of application before dialog will be displayed
storeAppURL.ios {String} null - application id in AppStore
storeAppURL.android {String} null - application URL in GooglePlay
storeAppURL.blackberry {String} null - application URL in AppWorld
storeAppURL.windows8 {String} null - application URL in WindowsStore
customLocale {Object} null - custom locale object

## Examples ##
### Example 1 ####
Detect locale automatically and show message on user language after each 3 launches

var cfg = {
appStoreAppURL: {
ios: "itms-apps://itunes.apple.com/app/id<my_app_id>?mt=8",
android: "market://details?id=<package_name>"
}
};
navigator.apprate.setup(cfg);
navigator.apprate.promptForRating();
#### Example 2 ####
Set custom locale strings and show message after each 5 launches

var cfg = {
useLanguage: "ru",
usesUntilPrompt: 5,
appStoreAppURL: {
ios: "itms-apps://itunes.apple.com/app/id<my_app_id>?mt=8",
android: "market://details?id=<package_name>"
}
};
navigator.apprate.setup(cfg);
navigator.apprate.promptForRating();

#### Example 3 ####
Set custom locale object and show message after each 10 launches

var cfg = {
usesUntilPrompt: 10,
displayAppName: "My Super App",
customLocale: {
title: "Rate %@",
message: "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!",
cancelButtonLabel: "No, Thanks",
laterButtonLabel: "Remind Me Later",
rateButtonLabel: "Rate It Now"
},
appStoreAppURL: {
ios: "itms-apps://itunes.apple.com/app/id<my_app_id>?mt=8",
android: "market://details?id=<package_name>"
}
};

#### Simple setup and call ####

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.storeAppURL.blackberry = 'appworld://content/[App Id]/';
AppRate.preferences.storeAppURL.windows8 = 'ms-windows-store:Review?name=<the Package Family Name of the application>';
AppRate.promptForRating();

#### Override dialog button callback ####

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.onButtonClicked = function(buttonIndex) {
console.log("onButtonClicked -> " + buttonIndex);
};
AppRate.promptForRating();
navigator.apprate.setup(cfg);
navigator.apprate.promptForRating();
#### Set custom language ####

AppRate.preferences.useLanguage = 'ru';
AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.promptForRating();

#### Set custom Locale object ####

var customLocale = {};
customLocale.title = "Rate %@";
customLocale.message = "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!";
customLocale.cancelButtonLabel = "No, Thanks";
customLocale.laterButtonLabel = "Remind Me Later";
customLocale.rateButtonLabel = "Rate It Now";

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.customLocale = customLocale;
AppRate.promptForRating();

#### Full setup ####

var customLocale = {};
customLocale.title = "Rate %@";
customLocale.message = "If you enjoy using %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!";
customLocale.cancelButtonLabel = "No, Thanks";
customLocale.laterButtonLabel = "Remind Me Later";
customLocale.rateButtonLabel = "Rate It Now";

AppRate.preferences.storeAppURL.ios = '<my_app_id>';
AppRate.preferences.storeAppURL.android = 'market://details?id=<package_name>';
AppRate.preferences.customLocale = customLocale;
AppRate.preferences.displayAppName = 'My custom app title';
AppRate.preferences.usesUntilPrompt = 5;
AppRate.preferences.promptAgainForEachNewVersion = false;
AppRate.promptForRating();
## Already included translations ##
ar, bn, ca, cs, da, de, el, en, es, fa, fr, he, hi, id, il, ja, ko, nl, no, pa, pl, pt, ru, sk, sl, sv, th, tr, uk, ur, vi, zh-TW

You can add a new translation here: [https://crowdin.net/project/apprate-cordovaphonegap-plugin](https://crowdin.net/project/apprate-cordovaphonegap-plugin)


## Licence ##
Expand Down
6 changes: 6 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
-->
# Release Notes #

### 1.1.2 (Oct 26, 2014) ###
* Issue-33: Code refactoring
* Added docs
* Added Windows8 basic support
* Implement SKStoreProductViewController (iOS)

### 1.1.1 (Sep 28, 2014) ###
* Updated locale object structure
* Fixed bug with order of buttons for some locales
Expand Down
Loading

0 comments on commit 80e25eb

Please sign in to comment.