@revenuecat/purchases-capacitor 7.5.9 → 7.5.10

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.
@@ -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 = '13.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'PurchasesHybridCommon', '10.6.1'
16
+ s.dependency 'PurchasesHybridCommon', '10.6.2'
17
17
  s.swift_version = '5.1'
18
18
  end
@@ -53,7 +53,7 @@ dependencies {
53
53
  implementation fileTree(dir: 'libs', include: ['*.jar'])
54
54
  implementation project(':capacitor-android')
55
55
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
56
- implementation 'com.revenuecat.purchases:purchases-hybrid-common:10.6.1'
56
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:10.6.2'
57
57
  testImplementation "junit:junit:$junitVersion"
58
58
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
59
59
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
@@ -76,7 +76,7 @@ class PurchasesPlugin : Plugin() {
76
76
 
77
77
  companion object {
78
78
  private const val PLATFORM_NAME = "capacitor"
79
- private const val PLUGIN_VERSION = "7.5.9"
79
+ private const val PLUGIN_VERSION = "7.5.10"
80
80
 
81
81
  private const val CUSTOMER_INFO_KEY = "customerInfo"
82
82
  }
@@ -371,7 +371,7 @@ class PurchasesPlugin : Plugin() {
371
371
  @PluginMethod(returnType = PluginMethod.RETURN_NONE)
372
372
  fun setAttributes(call: PluginCall) {
373
373
  if (rejectIfNotConfigured(call)) return
374
- val attributes = call.getObject("attributes")?.convertToMap() ?: emptyMap()
374
+ val attributes = call.data.convertToMap()
375
375
  setAttributesCommon(attributes)
376
376
  call.resolve()
377
377
  }
@@ -780,4 +780,4 @@ private fun JSONObject.convertToAnyMap(): Map<String, Any?> =
780
780
  }
781
781
  }
782
782
  }
783
- }
783
+ }
@@ -6,7 +6,11 @@ public extension PurchasesPlugin {
6
6
 
7
7
  @objc func setAttributes(_ call: CAPPluginCall) {
8
8
  guard self.rejectIfPurchasesNotConfigured(call) else { return }
9
- guard let attributes = call.getOrRejectObject("attributes") else { return }
9
+ let attributes = call.jsObjectRepresentation
10
+ if attributes.isEmpty {
11
+ call.resolve()
12
+ return
13
+ }
10
14
  CommonFunctionality.setAttributes(attributes)
11
15
  call.resolve()
12
16
  }
@@ -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 = "7.5.9"
15
+ private let platformVersion = "7.5.10"
16
16
 
17
17
  private let customerInfoKey = "customerInfo"
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-capacitor",
3
- "version": "7.5.9",
3
+ "version": "7.5.10",
4
4
  "description": "Capacitor in-app purchases and subscriptions made easy. Support for iOS and Android.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -72,6 +72,6 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
- "@revenuecat/purchases-typescript-internal-esm": "10.6.1"
75
+ "@revenuecat/purchases-typescript-internal-esm": "10.6.2"
76
76
  }
77
77
  }