@revenuecat/purchases-capacitor 11.1.2 → 11.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1261,18 +1261,20 @@ Check if configure has finished and Purchases has been configured.
1261
1261
 
1262
1262
  Holds parameters to initialize the SDK.
1263
1263
 
1264
- | Prop | Type | Description |
1265
- | ----------------------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1266
- | **`apiKey`** | <code>string</code> | RevenueCat API Key. Needs to be a string |
1267
- | **`appUserID`** | <code>string \| null</code> | A unique id for identifying the user |
1268
- | **`purchasesAreCompletedBy`** | <code><a href="#purchasesarecompletedby">PurchasesAreCompletedBy</a></code> | Set this to MY_APP and provide a <a href="#storekit_version">STOREKIT_VERSION</a> if you have your own IAP implementation and want to only use RevenueCat's backend. Defaults to <a href="#purchases_are_completed_by_type">PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT</a>. If you are on Android and setting this to MY_APP, will have to acknowledge the purchases yourself. If your app is only on Android, you may specify any StoreKit version, as it is ignored by the Android SDK. |
1269
- | **`userDefaultsSuiteName`** | <code>string</code> | 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. |
1270
- | **`storeKitVersion`** | <code><a href="#storekit_version">STOREKIT_VERSION</a></code> | iOS-only, will be ignored for Android. By selecting the DEFAULT value, RevenueCat will automatically select the most appropriate StoreKit version for the app's runtime environment. - Warning: Make sure you have an In-App Purchase Key configured in your app. Please see https://rev.cat/in-app-purchase-key-configuration for more info. - Note: StoreKit 2 is only available on iOS 16+. StoreKit 1 will be used for previous iOS versions regardless of this setting. |
1271
- | **`useAmazon`** | <code>boolean</code> | An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore. |
1272
- | **`shouldShowInAppMessagesAutomatically`** | <code>boolean</code> | Whether we should show store in-app messages automatically. Both Google Play and the App <a href="#store">Store</a> provide in-app messages for some situations like billing issues. By default, those messages will be shown automatically. This allows to disable that behavior, so you can display those messages at your convenience. For more information, check: https://rev.cat/storekit-message and https://rev.cat/googleplayinappmessaging |
1273
- | **`entitlementVerificationMode`** | <code><a href="#entitlement_verification_mode">ENTITLEMENT_VERIFICATION_MODE</a></code> | Verification strictness levels for [EntitlementInfo]. See https://rev.cat/trusted-entitlements for more info. |
1274
- | **`pendingTransactionsForPrepaidPlansEnabled`** | <code>boolean</code> | Enable this setting if you want to allow pending purchases for prepaid subscriptions (only supported in Google Play). Note that entitlements are not granted until payment is done. Disabled by default. |
1275
- | **`diagnosticsEnabled`** | <code>boolean</code> | Enabling diagnostics will send some performance and debugging information from the SDK to RevenueCat's servers. Examples of this information include response times, cache hits or error codes. No personal identifiable information will be collected. The default value is false. |
1264
+ | Prop | Type | Description |
1265
+ | ------------------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1266
+ | **`apiKey`** | <code>string</code> | RevenueCat API Key. Needs to be a string |
1267
+ | **`appUserID`** | <code>string \| null</code> | A unique id for identifying the user |
1268
+ | **`purchasesAreCompletedBy`** | <code><a href="#purchasesarecompletedby">PurchasesAreCompletedBy</a></code> | Set this to MY_APP and provide a <a href="#storekit_version">STOREKIT_VERSION</a> if you have your own IAP implementation and want to only use RevenueCat's backend. Defaults to <a href="#purchases_are_completed_by_type">PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT</a>. If you are on Android and setting this to MY_APP, will have to acknowledge the purchases yourself. If your app is only on Android, you may specify any StoreKit version, as it is ignored by the Android SDK. |
1269
+ | **`userDefaultsSuiteName`** | <code>string</code> | 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. |
1270
+ | **`storeKitVersion`** | <code><a href="#storekit_version">STOREKIT_VERSION</a></code> | iOS-only, will be ignored for Android. By selecting the DEFAULT value, RevenueCat will automatically select the most appropriate StoreKit version for the app's runtime environment. - Warning: Make sure you have an In-App Purchase Key configured in your app. Please see https://rev.cat/in-app-purchase-key-configuration for more info. - Note: StoreKit 2 is only available on iOS 16+. StoreKit 1 will be used for previous iOS versions regardless of this setting. |
1271
+ | **`useAmazon`** | <code>boolean</code> | An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore. |
1272
+ | **`shouldShowInAppMessagesAutomatically`** | <code>boolean</code> | Whether we should show store in-app messages automatically. Both Google Play and the App <a href="#store">Store</a> provide in-app messages for some situations like billing issues. By default, those messages will be shown automatically. This allows to disable that behavior, so you can display those messages at your convenience. For more information, check: https://rev.cat/storekit-message and https://rev.cat/googleplayinappmessaging |
1273
+ | **`entitlementVerificationMode`** | <code><a href="#entitlement_verification_mode">ENTITLEMENT_VERIFICATION_MODE</a></code> | Verification strictness levels for [EntitlementInfo]. See https://rev.cat/trusted-entitlements for more info. |
1274
+ | **`pendingTransactionsForPrepaidPlansEnabled`** | <code>boolean</code> | Enable this setting if you want to allow pending purchases for prepaid subscriptions (only supported in Google Play). Note that entitlements are not granted until payment is done. Disabled by default. |
1275
+ | **`diagnosticsEnabled`** | <code>boolean</code> | Enabling diagnostics will send some performance and debugging information from the SDK to RevenueCat's servers. Examples of this information include response times, cache hits or error codes. No personal identifiable information will be collected. The default value is false. |
1276
+ | **`automaticDeviceIdentifierCollectionEnabled`** | <code>boolean</code> | Enable this setting to allow the collection of identifiers when setting the identifier for an attribution network. For example, when calling `Purchases.setAdjustID` or `Purchases.setAppsflyerID`, the SDK would collect some device identifiers, if available, and send them to RevenueCat. This is required by some attribution networks to attribute installs and re-installs. Enabling this setting does NOT mean we will always collect the identifiers. We will only do so when setting an attribution network ID AND the user has not limited ad tracking on their device. Default is enabled. |
1277
+ | **`preferredUILocaleOverride`** | <code>string</code> | Override the preferred UI locale for RevenueCat UI components at runtime. This affects both API requests and UI rendering. This will automatically clear the offerings cache and trigger a background refetch to get paywall templates with the correct localizations. |
1276
1278
 
1277
1279
 
1278
1280
  #### PurchasesVirtualCurrencies
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '14.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'PurchasesHybridCommon', '17.0.0'
16
+ s.dependency 'PurchasesHybridCommon', '17.6.0'
17
17
  s.swift_version = '5.1'
18
18
  end
@@ -11,7 +11,7 @@ buildscript {
11
11
  mavenCentral()
12
12
  }
13
13
  dependencies {
14
- classpath 'com.android.tools.build:gradle:8.12.0'
14
+ classpath 'com.android.tools.build:gradle:8.13.0'
15
15
  classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20'
16
16
  }
17
17
  }
@@ -56,7 +56,7 @@ dependencies {
56
56
  implementation fileTree(dir: 'libs', include: ['*.jar'])
57
57
  implementation project(':capacitor-android')
58
58
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
59
- implementation 'com.revenuecat.purchases:purchases-hybrid-common:17.0.0'
59
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:17.6.0'
60
60
  testImplementation "junit:junit:$junitVersion"
61
61
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
62
62
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
@@ -83,7 +83,7 @@ class PurchasesPlugin : Plugin() {
83
83
 
84
84
  companion object {
85
85
  private const val PLATFORM_NAME = "capacitor"
86
- private const val PLUGIN_VERSION = "11.1.2"
86
+ private const val PLUGIN_VERSION = "11.2.1"
87
87
 
88
88
  private const val CUSTOMER_INFO_KEY = "customerInfo"
89
89
  }
@@ -105,6 +105,7 @@ class PurchasesPlugin : Plugin() {
105
105
  val entitlementVerificationMode = call.getString("entitlementVerificationMode")
106
106
  val pendingTransactionsForPrepaidPlansEnabled = call.getBoolean("pendingTransactionsForPrepaidPlansEnabled")
107
107
  val diagnosticsEnabled = call.getBoolean("diagnosticsEnabled")
108
+ val automaticDeviceIdentifierCollectionEnabled = call.getBoolean("automaticDeviceIdentifierCollectionEnabled")
108
109
 
109
110
  configure(
110
111
  context.applicationContext,
@@ -117,6 +118,7 @@ class PurchasesPlugin : Plugin() {
117
118
  verificationMode = entitlementVerificationMode,
118
119
  pendingTransactionsForPrepaidPlansEnabled = pendingTransactionsForPrepaidPlansEnabled,
119
120
  diagnosticsEnabled = diagnosticsEnabled,
121
+ automaticDeviceIdentifierCollectionEnabled = automaticDeviceIdentifierCollectionEnabled,
120
122
  )
121
123
  Purchases.sharedInstance.updatedCustomerInfoListener = UpdatedCustomerInfoListener { customerInfo ->
122
124
  customerInfo.mapAsync { map ->
package/dist/docs.json CHANGED
@@ -1677,6 +1677,25 @@
1677
1677
  "docs": "Enabling diagnostics will send some performance and debugging information from the SDK to RevenueCat's servers.\nExamples of this information include response times, cache hits or error codes.\nNo personal identifiable information will be collected.\nThe default value is false.",
1678
1678
  "complexTypes": [],
1679
1679
  "type": "boolean | undefined"
1680
+ },
1681
+ {
1682
+ "name": "automaticDeviceIdentifierCollectionEnabled",
1683
+ "tags": [],
1684
+ "docs": "Enable this setting to allow the collection of identifiers when setting the identifier for an\nattribution network. For example, when calling `Purchases.setAdjustID` or `Purchases.setAppsflyerID`,\nthe SDK would collect some device identifiers, if available, and send them\nto RevenueCat. This is required by some attribution networks to attribute installs and re-installs.\n\nEnabling this setting does NOT mean we will always collect the identifiers. We will only do so when\nsetting an attribution network ID AND the user has not limited ad tracking on their device.\n\nDefault is enabled.",
1685
+ "complexTypes": [],
1686
+ "type": "boolean | undefined"
1687
+ },
1688
+ {
1689
+ "name": "preferredUILocaleOverride",
1690
+ "tags": [
1691
+ {
1692
+ "text": "localeString - The locale string (e.g., \"es-ES\", \"en-US\") or null to use system default",
1693
+ "name": "param"
1694
+ }
1695
+ ],
1696
+ "docs": "Override the preferred UI locale for RevenueCat UI components at runtime. This affects both API requests and UI rendering.\nThis will automatically clear the offerings cache and trigger a background refetch to get paywall templates with the correct localizations.",
1697
+ "complexTypes": [],
1698
+ "type": "string | undefined"
1680
1699
  }
1681
1700
  ]
1682
1701
  },
@@ -12,7 +12,7 @@ import RevenueCat
12
12
  @objc(PurchasesPlugin)
13
13
  public class PurchasesPlugin: CAPPlugin, PurchasesDelegate {
14
14
  private let platformFlavor = "capacitor"
15
- private let platformVersion = "11.1.2"
15
+ private let platformVersion = "11.2.1"
16
16
 
17
17
  private let customerInfoKey = "customerInfo"
18
18
  private let transactionKey = "transaction"
@@ -53,6 +53,7 @@ public class PurchasesPlugin: CAPPlugin, PurchasesDelegate {
53
53
  let shouldShowInAppMessagesAutomatically = call.getBool("shouldShowInAppMessagesAutomatically") ?? true
54
54
  let entitlementVerificationMode = call.getString("entitlementVerificationMode")
55
55
  let diagnosticsEnabled = call.getBool("diagnosticsEnabled") ?? false
56
+ let automaticDeviceIdentifierCollectionEnabled = call.getBool("automaticDeviceIdentifierCollectionEnabled") ?? true
56
57
 
57
58
  let purchases = Purchases.configure(apiKey: apiKey,
58
59
  appUserID: appUserID,
@@ -64,7 +65,8 @@ public class PurchasesPlugin: CAPPlugin, PurchasesDelegate {
64
65
  dangerousSettings: DangerousSettings(),
65
66
  shouldShowInAppMessagesAutomatically: shouldShowInAppMessagesAutomatically,
66
67
  verificationMode: entitlementVerificationMode,
67
- diagnosticsEnabled: diagnosticsEnabled)
68
+ diagnosticsEnabled: diagnosticsEnabled,
69
+ automaticDeviceIdentifierCollectionEnabled: automaticDeviceIdentifierCollectionEnabled)
68
70
  purchases.delegate = self
69
71
  call.resolve()
70
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-capacitor",
3
- "version": "11.1.2",
3
+ "version": "11.2.1",
4
4
  "description": "Capacitor in-app purchases and subscriptions made easy. Support for iOS and Android.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -73,6 +73,6 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "@revenuecat/purchases-typescript-internal-esm": "17.0.0"
76
+ "@revenuecat/purchases-typescript-internal-esm": "17.6.0"
77
77
  }
78
78
  }