@revenuecat/purchases-capacitor 10.3.6 → 10.3.7
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 = '14.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'PurchasesHybridCommon', '
|
|
16
|
+
s.dependency 'PurchasesHybridCommon', '14.0.2'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
end
|
package/android/build.gradle
CHANGED
|
@@ -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:
|
|
59
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common:14.0.2'
|
|
60
60
|
testImplementation "junit:junit:$junitVersion"
|
|
61
61
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
62
62
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -22,7 +22,7 @@ import com.revenuecat.purchases.hybridcommon.configure
|
|
|
22
22
|
import com.revenuecat.purchases.hybridcommon.getProductInfo
|
|
23
23
|
import com.revenuecat.purchases.hybridcommon.isWebPurchaseRedemptionURL
|
|
24
24
|
import com.revenuecat.purchases.hybridcommon.mappers.convertToMap
|
|
25
|
-
import com.revenuecat.purchases.hybridcommon.mappers.
|
|
25
|
+
import com.revenuecat.purchases.hybridcommon.mappers.mapAsync
|
|
26
26
|
import com.revenuecat.purchases.hybridcommon.purchaseProduct
|
|
27
27
|
import com.revenuecat.purchases.hybridcommon.showInAppMessagesIfNeeded
|
|
28
28
|
import com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener
|
|
@@ -80,7 +80,7 @@ class PurchasesPlugin : Plugin() {
|
|
|
80
80
|
|
|
81
81
|
companion object {
|
|
82
82
|
private const val PLATFORM_NAME = "capacitor"
|
|
83
|
-
private const val PLUGIN_VERSION = "10.3.
|
|
83
|
+
private const val PLUGIN_VERSION = "10.3.7"
|
|
84
84
|
|
|
85
85
|
private const val CUSTOMER_INFO_KEY = "customerInfo"
|
|
86
86
|
}
|
|
@@ -116,8 +116,10 @@ class PurchasesPlugin : Plugin() {
|
|
|
116
116
|
diagnosticsEnabled = diagnosticsEnabled,
|
|
117
117
|
)
|
|
118
118
|
Purchases.sharedInstance.updatedCustomerInfoListener = UpdatedCustomerInfoListener { customerInfo ->
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
customerInfo.mapAsync { map ->
|
|
120
|
+
for (callbackId in customerInfoListeners) {
|
|
121
|
+
bridge.getSavedCall(callbackId)?.resolveWithMap(map)
|
|
122
|
+
}
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
call.resolve()
|
|
@@ -161,7 +163,7 @@ class PurchasesPlugin : Plugin() {
|
|
|
161
163
|
if (rejectIfNotConfigured(call)) return
|
|
162
164
|
customerInfoListeners.add(call.callbackId)
|
|
163
165
|
call.setKeepAlive(true)
|
|
164
|
-
lastSeenCustomerInfo?.let { call.resolveWithMap(
|
|
166
|
+
lastSeenCustomerInfo?.let { it.mapAsync { map -> call.resolveWithMap(map) } }
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
@@ -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 = "10.3.
|
|
15
|
+
private let platformVersion = "10.3.7"
|
|
16
16
|
|
|
17
17
|
private let customerInfoKey = "customerInfo"
|
|
18
18
|
private let transactionKey = "transaction"
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-capacitor",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.7",
|
|
4
4
|
"description": "Capacitor in-app purchases and subscriptions made easy. Support for iOS and Android.",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|
|
8
8
|
"unpkg": "dist/plugin.js",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@revenuecat/purchases-typescript-internal-esm": "
|
|
76
|
+
"@revenuecat/purchases-typescript-internal-esm": "14.0.2"
|
|
77
77
|
}
|
|
78
78
|
}
|