mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 00:12:53 +08:00
feat(purchases): update to plugin version 1.2.0 (#3482)
* updates to 1.2.0 * fixes linter errors
This commit is contained in:
parent
26d10ef633
commit
a010bb1869
@ -207,7 +207,7 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@1.1.0',
|
||||
plugin: 'cordova-plugin-purchases@1.2.0',
|
||||
pluginRef: 'Purchases', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/RevenueCat/cordova-plugin-purchases', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
@ -259,9 +259,12 @@ export class Purchases extends IonicNativePlugin {
|
||||
* @param {boolean} observerMode An optional boolean. Set this to TRUE if you have your own IAP implementation and
|
||||
* want to use only RevenueCat's backend. Default is FALSE. If you are on Android and setting this to ON, you will have
|
||||
* to acknowledge the purchases yourself.
|
||||
* @param {string?} userDefaultsSuiteName An optional string. iOS-only, will be ignored for Android.
|
||||
* Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false): void {}
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false, userDefaultsSuiteName?: string): void {}
|
||||
|
||||
/**
|
||||
* Set this to true if you are passing in an appUserID but it is anonymous, this is true by default if you didn't pass an appUserID
|
||||
@ -539,8 +542,13 @@ export class Purchases extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Invalidates the cache for purchaser information.
|
||||
* This is useful for cases where purchaser information might have been updated outside of the app, like if a
|
||||
* promotional subscription is granted through the RevenueCat dashboard.
|
||||
*
|
||||
* Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.
|
||||
* Refer to https://docs.revenuecat.com/docs/purchaserinfo#section-get-user-information for more information on
|
||||
* using the cache properly.
|
||||
*
|
||||
* This is useful for cases where purchaser information might have been updated outside of the
|
||||
* app, like if a promotional subscription is granted through the RevenueCat dashboard.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
invalidatePurchaserInfoCache(): void {}
|
||||
@ -589,6 +597,13 @@ export class Purchases extends IonicNativePlugin {
|
||||
|
||||
@Cordova({ sync: true })
|
||||
setPushToken(pushToken: string | null): void {}
|
||||
/**
|
||||
* Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value from your RevenueCat contact.
|
||||
* @param url Proxy URL as a string.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setProxyURL(url: string): void {}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -727,6 +742,18 @@ export interface PurchaserInfo {
|
||||
* in Android
|
||||
*/
|
||||
readonly originalApplicationVersion: string | null;
|
||||
/**
|
||||
* Returns the purchase date for the version of the application when the user bought the app.
|
||||
* Use this for grandfathering users when migrating to subscriptions.
|
||||
*/
|
||||
readonly originalPurchaseDate: string | null;
|
||||
/**
|
||||
* URL to manage the active subscription of the user. If this user has an active iOS
|
||||
* subscription, this will point to the App Store, if the user has an active Play Store subscription
|
||||
* it will point there. If there are no active subscriptions it will be null.
|
||||
* If there are multiple for different platforms, it will point to the device store.
|
||||
*/
|
||||
readonly managementURL: string | null;
|
||||
}
|
||||
|
||||
export interface PurchasesProduct {
|
||||
|
Loading…
Reference in New Issue
Block a user