Update example code and remove preferences object

This commit is contained in:
Damian Tarnawsky 2021-08-23 07:49:21 -07:00
parent b9731d4abb
commit 38c8d8b4dc

View File

@ -214,23 +214,25 @@ export interface AppUrls {
* *
* ... * ...
* // set certain preferences * // set certain preferences
* this.appRate.preferences.storeAppURL = { * this.appRate.setPreferences({
* storeAppURL: {
* ios: '<app_id>', * ios: '<app_id>',
* android: 'market://details?id=<package_name>', * android: 'market://details?id=<package_name>',
* windows: 'ms-windows-store://review/?ProductId=<store_id>' * windows: 'ms-windows-store://review/?ProductId=<store_id>'
* } * }
* });
* *
* this.appRate.promptForRating(true); * this.appRate.promptForRating(true);
* *
* // or, override the whole preferences object * // or, override the whole preferences object
* this.appRate.preferences = { * this.appRate.setPreferences({
* usesUntilPrompt: 3, * usesUntilPrompt: 3,
* storeAppURL: { * storeAppURL: {
* ios: '<app_id>', * ios: '<app_id>',
* android: 'market://details?id=<package_name>', * android: 'market://details?id=<package_name>',
* windows: 'ms-windows-store://review/?ProductId=<store_id>' * windows: 'ms-windows-store://review/?ProductId=<store_id>'
* } * }
* } * });
* *
* this.appRate.promptForRating(false); * this.appRate.promptForRating(false);
* ``` * ```
@ -251,13 +253,6 @@ export interface AppUrls {
}) })
@Injectable() @Injectable()
export class AppRate extends IonicNativePlugin { export class AppRate extends IonicNativePlugin {
/**
* Configure various settings for the Rating View.
* See table below for options
*/
@CordovaProperty()
preferences: AppRatePreferences;
/** /**
* Manager custom locales * Manager custom locales
*/ */