@revenuecat/purchases-capacitor 7.3.1 → 7.4.0

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
@@ -16,7 +16,7 @@ Whether you are building a new app or already have millions of customers, you ca
16
16
 
17
17
  Sign up to [get started for free](https://app.revenuecat.com/signup).
18
18
 
19
- ## @revenucat/purchases-capacitor
19
+ ## @revenuecat/purchases-capacitor
20
20
 
21
21
  *@revenuecat/purchases-capacitor* is the client for the [RevenueCat](https://www.revenuecat.com/) subscription and purchase tracking system. It is an open source framework that provides a wrapper around StoreKit, Google Play Billing and the RevenueCat backend to make implementing in-app purchases in Capacitor easy.
22
22
 
@@ -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', '8.1.1'
16
+ s.dependency 'PurchasesHybridCommon', '8.2.1'
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:8.1.1'
56
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:8.2.1'
57
57
  testImplementation "junit:junit:$junitVersion"
58
58
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
59
59
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
@@ -72,7 +72,7 @@ class PurchasesPlugin : Plugin() {
72
72
 
73
73
  companion object {
74
74
  private const val PLATFORM_NAME = "capacitor"
75
- private const val PLUGIN_VERSION = "7.3.1"
75
+ private const val PLUGIN_VERSION = "7.4.0"
76
76
 
77
77
  private const val CUSTOMER_INFO_KEY = "customerInfo"
78
78
  }
@@ -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.3.1"
15
+ private let platformVersion = "7.4.0"
16
16
 
17
17
  private let customerInfoKey = "customerInfo"
18
18
 
@@ -122,12 +122,12 @@ public class PurchasesPlugin: CAPPlugin, PurchasesDelegate {
122
122
  return
123
123
  }
124
124
  guard let discount = call.getOrRejectObject("discount") else { return }
125
- guard let signedDiscounTimestamp = discount["timestamp"] as? String else {
125
+ guard let signedDiscountTimestamp = discount["timestamp"] as? Int else {
126
126
  call.reject("Discount parameter did not have timestamp key")
127
127
  return
128
128
  }
129
129
  CommonFunctionality.purchase(product: productId,
130
- signedDiscountTimestamp: signedDiscounTimestamp,
130
+ signedDiscountTimestamp: String(signedDiscountTimestamp),
131
131
  completion: self.getCompletionBlockHandler(call))
132
132
  }
133
133
 
@@ -164,13 +164,13 @@ public class PurchasesPlugin: CAPPlugin, PurchasesDelegate {
164
164
  return
165
165
  }
166
166
  guard let discount = call.getOrRejectObject("discount") else { return }
167
- guard let signedDiscounTimestamp = discount["timestamp"] as? String else {
167
+ guard let signedDiscountTimestamp = discount["timestamp"] as? Int else {
168
168
  call.reject("Discount parameter did not have timestamp key")
169
169
  return
170
170
  }
171
171
  CommonFunctionality.purchase(package: packageId,
172
172
  offeringIdentifier: offeringIdentifier,
173
- signedDiscountTimestamp: signedDiscounTimestamp,
173
+ signedDiscountTimestamp: String(signedDiscountTimestamp),
174
174
  completion: self.getCompletionBlockHandler(call))
175
175
  }
176
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-capacitor",
3
- "version": "7.3.1",
3
+ "version": "7.4.0",
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": "8.1.1"
75
+ "@revenuecat/purchases-typescript-internal-esm": "8.2.1"
76
76
  }
77
77
  }