react-native-purchases 9.12.0 → 9.14.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/RNPurchases.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -29,7 +29,7 @@ android {
|
|
|
29
29
|
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
30
30
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
31
31
|
versionCode 1
|
|
32
|
-
versionName '9.
|
|
32
|
+
versionName '9.14.0'
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
buildTypes {
|
|
@@ -121,6 +121,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
|
|
|
121
121
|
dependencies {
|
|
122
122
|
//noinspection GradleDynamicVersion
|
|
123
123
|
api 'com.facebook.react:react-native:+'
|
|
124
|
-
implementation 'com.revenuecat.purchases:purchases-hybrid-common:17.
|
|
124
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common:17.52.0'
|
|
125
125
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
126
126
|
}
|
|
@@ -51,7 +51,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
51
51
|
private static final String TRACKED_EVENT = "Purchases-TrackedEvent";
|
|
52
52
|
private static final String DEBUG_EVENT = "Purchases-DebugEvent";
|
|
53
53
|
public static final String PLATFORM_NAME = "react-native";
|
|
54
|
-
public static final String PLUGIN_VERSION = "9.
|
|
54
|
+
public static final String PLUGIN_VERSION = "9.14.0";
|
|
55
55
|
|
|
56
56
|
private final ReactApplicationContext reactContext;
|
|
57
57
|
|
|
@@ -609,6 +609,11 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
609
609
|
CommonKt.redeemWebPurchase(urlString, getOnResult(promise));
|
|
610
610
|
}
|
|
611
611
|
|
|
612
|
+
@ReactMethod
|
|
613
|
+
public void trackCustomPaywallImpression(ReadableMap data) {
|
|
614
|
+
CommonKt.trackCustomPaywallImpression(data.toHashMap());
|
|
615
|
+
}
|
|
616
|
+
|
|
612
617
|
// endregion
|
|
613
618
|
|
|
614
619
|
//================================================================================
|
package/dist/purchases.d.ts
CHANGED
|
@@ -9,6 +9,17 @@ export interface SyncPurchasesResult {
|
|
|
9
9
|
customerInfo: CustomerInfo;
|
|
10
10
|
}
|
|
11
11
|
export { PURCHASE_TYPE, PurchasesAreCompletedBy, PurchasesAreCompletedByMyApp, PURCHASES_ARE_COMPLETED_BY_TYPE, BILLING_FEATURE, REFUND_REQUEST_STATUS, LOG_LEVEL, STOREKIT_VERSION, PurchasesConfiguration, CustomerInfoUpdateListener, ShouldPurchasePromoProductListener, MakePurchaseResult, LogHandler, LogInResult, WebPurchaseRedemption, WebPurchaseRedemptionResult, WebPurchaseRedemptionResultType, } from "@revenuecat/purchases-typescript-internal";
|
|
12
|
+
/**
|
|
13
|
+
* Options for tracking a custom paywall impression.
|
|
14
|
+
*/
|
|
15
|
+
export interface TrackCustomPaywallImpressionOptions {
|
|
16
|
+
paywallId?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* An optional identifier for the offering associated with the custom paywall.
|
|
19
|
+
* If not provided, the SDK will use the current offering identifier from the cache.
|
|
20
|
+
*/
|
|
21
|
+
offeringId?: string | null;
|
|
22
|
+
}
|
|
12
23
|
export default class Purchases {
|
|
13
24
|
/**
|
|
14
25
|
* Supported SKU types.
|
|
@@ -847,6 +858,17 @@ export default class Purchases {
|
|
|
847
858
|
* @returns {Promise<Boolean>} promise with boolean response
|
|
848
859
|
*/
|
|
849
860
|
static isConfigured(): Promise<boolean>;
|
|
861
|
+
/**
|
|
862
|
+
* Tracks an impression of a custom (non-RevenueCat) paywall.
|
|
863
|
+
* Call this method when your custom paywall is displayed to a user.
|
|
864
|
+
* This enables RevenueCat to track paywall impressions for analytics.
|
|
865
|
+
*
|
|
866
|
+
* @param params - Optional parameters for the impression event.
|
|
867
|
+
* @param params.paywallId - Optional identifier for the custom paywall being shown.
|
|
868
|
+
* @param params.offeringId - Optional identifier for the offering associated with the custom paywall.
|
|
869
|
+
* If not provided, the SDK will use the current offering identifier from the cache.
|
|
870
|
+
*/
|
|
871
|
+
static trackCustomPaywallImpression(params?: TrackCustomPaywallImpressionOptions): Promise<void>;
|
|
850
872
|
private static throwIfNotConfigured;
|
|
851
873
|
private static throwIfAndroidPlatform;
|
|
852
874
|
private static throwIfIOSPlatform;
|
package/dist/purchases.js
CHANGED
|
@@ -1957,6 +1957,29 @@ var Purchases = /** @class */ (function () {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
return RNPurchases.isConfigured();
|
|
1959
1959
|
};
|
|
1960
|
+
/**
|
|
1961
|
+
* Tracks an impression of a custom (non-RevenueCat) paywall.
|
|
1962
|
+
* Call this method when your custom paywall is displayed to a user.
|
|
1963
|
+
* This enables RevenueCat to track paywall impressions for analytics.
|
|
1964
|
+
*
|
|
1965
|
+
* @param params - Optional parameters for the impression event.
|
|
1966
|
+
* @param params.paywallId - Optional identifier for the custom paywall being shown.
|
|
1967
|
+
* @param params.offeringId - Optional identifier for the offering associated with the custom paywall.
|
|
1968
|
+
* If not provided, the SDK will use the current offering identifier from the cache.
|
|
1969
|
+
*/
|
|
1970
|
+
Purchases.trackCustomPaywallImpression = function (params) {
|
|
1971
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1972
|
+
return __generator(this, function (_a) {
|
|
1973
|
+
switch (_a.label) {
|
|
1974
|
+
case 0: return [4 /*yield*/, Purchases.throwIfNotConfigured()];
|
|
1975
|
+
case 1:
|
|
1976
|
+
_a.sent();
|
|
1977
|
+
RNPurchases.trackCustomPaywallImpression(params !== null && params !== void 0 ? params : {});
|
|
1978
|
+
return [2 /*return*/];
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
});
|
|
1982
|
+
};
|
|
1960
1983
|
Purchases.throwIfNotConfigured = function () {
|
|
1961
1984
|
return __awaiter(this, void 0, void 0, function () {
|
|
1962
1985
|
var isConfigured;
|
package/ios/RNPurchases.m
CHANGED
|
@@ -627,6 +627,14 @@ RCT_EXPORT_METHOD(recordPurchaseForProductID:(nonnull NSString *)productID
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
+
RCT_EXPORT_METHOD(trackCustomPaywallImpression:(NSDictionary *)data) {
|
|
631
|
+
if (@available(iOS 15.0, tvOS 15.0, macOS 12.0, watchOS 8.0, *)) {
|
|
632
|
+
[RCCommonFunctionality trackCustomPaywallImpression:data];
|
|
633
|
+
} else {
|
|
634
|
+
NSLog(@"[Purchases] Warning: tried to call trackCustomPaywallImpression, but it's only available on iOS 15.0 or greater.");
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
630
638
|
#pragma mark -
|
|
631
639
|
#pragma mark Delegate Methods
|
|
632
640
|
- (void)purchases:(RCPurchases *)purchases receivedUpdatedCustomerInfo:(RCCustomerInfo *)customerInfo {
|
|
@@ -689,7 +697,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
|
|
|
689
697
|
}
|
|
690
698
|
|
|
691
699
|
- (NSString *)platformFlavorVersion {
|
|
692
|
-
return @"9.
|
|
700
|
+
return @"9.14.0";
|
|
693
701
|
}
|
|
694
702
|
|
|
695
703
|
@end
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-purchases",
|
|
3
3
|
"title": "React Native Purchases",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.14.0",
|
|
5
5
|
"description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android. ",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
]
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@revenuecat/purchases-js-hybrid-mappings": "17.
|
|
118
|
-
"@revenuecat/purchases-typescript-internal": "17.
|
|
117
|
+
"@revenuecat/purchases-js-hybrid-mappings": "17.52.0",
|
|
118
|
+
"@revenuecat/purchases-typescript-internal": "17.52.0"
|
|
119
119
|
}
|
|
120
120
|
}
|