react-native-purchases 8.9.7 → 8.10.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/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 '8.
|
|
32
|
+
versionName '8.10.1'
|
|
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:13.
|
|
124
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common:13.32.0'
|
|
125
125
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
126
126
|
}
|
|
@@ -47,7 +47,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
47
47
|
private static final String CUSTOMER_INFO_UPDATED = "Purchases-CustomerInfoUpdated";
|
|
48
48
|
private static final String LOG_HANDLER_EVENT = "Purchases-LogHandlerEvent";
|
|
49
49
|
public static final String PLATFORM_NAME = "react-native";
|
|
50
|
-
public static final String PLUGIN_VERSION = "8.
|
|
50
|
+
public static final String PLUGIN_VERSION = "8.10.1";
|
|
51
51
|
|
|
52
52
|
private final ReactApplicationContext reactContext;
|
|
53
53
|
|
|
@@ -87,7 +87,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
87
87
|
@Nullable String storeKitVersion, boolean useAmazon,
|
|
88
88
|
boolean shouldShowInAppMessagesAutomatically,
|
|
89
89
|
@Nullable String entitlementVerificationMode,
|
|
90
|
-
boolean pendingTransactionsForPrepaidPlansEnabled,
|
|
90
|
+
boolean pendingTransactionsForPrepaidPlansEnabled,
|
|
91
91
|
boolean diagnosticsEnabled) {
|
|
92
92
|
PlatformInfo platformInfo = new PlatformInfo(PLATFORM_NAME, PLUGIN_VERSION);
|
|
93
93
|
Store store = Store.PLAY_STORE;
|
|
@@ -239,6 +239,18 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
239
239
|
promise.resolve(CommonKt.getAppUserID());
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
@ReactMethod
|
|
243
|
+
public void getStorefront(final Promise promise) {
|
|
244
|
+
CommonKt.getStorefront(storefrontMap -> {
|
|
245
|
+
if (storefrontMap == null) {
|
|
246
|
+
promise.resolve(null);
|
|
247
|
+
} else {
|
|
248
|
+
promise.resolve(convertMapToWriteableMap(storefrontMap));
|
|
249
|
+
}
|
|
250
|
+
return null;
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
242
254
|
@ReactMethod
|
|
243
255
|
public void restorePurchases(final Promise promise) {
|
|
244
256
|
CommonKt.restorePurchases(getOnResult(promise));
|
package/dist/purchases.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PURCHASES_ERROR_CODE, UninitializedPurchasesError, UnsupportedPlatformError, CustomerInfo, PurchasesEntitlementInfo, PRORATION_MODE, PACKAGE_TYPE, INTRO_ELIGIBILITY_STATUS, PurchasesOfferings, PurchasesStoreProduct, UpgradeInfo, PurchasesPromotionalOffer, PurchasesPackage, IntroEligibility, PurchasesStoreProductDiscount, SubscriptionOption, PRODUCT_CATEGORY, GoogleProductChangeInfo, PURCHASE_TYPE, BILLING_FEATURE, REFUND_REQUEST_STATUS, LOG_LEVEL, PurchasesConfiguration, CustomerInfoUpdateListener, ShouldPurchasePromoProductListener, MakePurchaseResult, LogHandler, LogInResult, IN_APP_MESSAGE_TYPE, ENTITLEMENT_VERIFICATION_MODE, VERIFICATION_RESULT, STOREKIT_VERSION, PurchasesStoreTransaction, PurchasesOffering, PURCHASES_ARE_COMPLETED_BY_TYPE, PurchasesWinBackOffer, WebPurchaseRedemption, WebPurchaseRedemptionResult } from "@revenuecat/purchases-typescript-internal";
|
|
1
|
+
import { PURCHASES_ERROR_CODE, UninitializedPurchasesError, UnsupportedPlatformError, CustomerInfo, PurchasesEntitlementInfo, PRORATION_MODE, PACKAGE_TYPE, INTRO_ELIGIBILITY_STATUS, PurchasesOfferings, PurchasesStoreProduct, UpgradeInfo, PurchasesPromotionalOffer, PurchasesPackage, IntroEligibility, PurchasesStoreProductDiscount, SubscriptionOption, PRODUCT_CATEGORY, GoogleProductChangeInfo, PURCHASE_TYPE, BILLING_FEATURE, REFUND_REQUEST_STATUS, LOG_LEVEL, PurchasesConfiguration, CustomerInfoUpdateListener, ShouldPurchasePromoProductListener, MakePurchaseResult, LogHandler, LogInResult, IN_APP_MESSAGE_TYPE, ENTITLEMENT_VERIFICATION_MODE, VERIFICATION_RESULT, STOREKIT_VERSION, PurchasesStoreTransaction, PurchasesOffering, PURCHASES_ARE_COMPLETED_BY_TYPE, PurchasesWinBackOffer, WebPurchaseRedemption, WebPurchaseRedemptionResult, Storefront } from "@revenuecat/purchases-typescript-internal";
|
|
2
2
|
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, } from "@revenuecat/purchases-typescript-internal";
|
|
3
3
|
export default class Purchases {
|
|
4
4
|
/**
|
|
@@ -283,6 +283,11 @@ export default class Purchases {
|
|
|
283
283
|
* @returns {Promise<string>} The app user id in a promise
|
|
284
284
|
*/
|
|
285
285
|
static getAppUserID(): Promise<string>;
|
|
286
|
+
/**
|
|
287
|
+
* Gets the storefront for the current store account.
|
|
288
|
+
* @returns {Promise<Storefront | null>} The storefront for the current store account, or null if the storefront is not available.
|
|
289
|
+
*/
|
|
290
|
+
static getStorefront(): Promise<Storefront | null>;
|
|
286
291
|
/**
|
|
287
292
|
* This function will logIn the current user with an appUserID. Typically this would be used after a log in
|
|
288
293
|
* to identify a user without calling configure.
|
package/dist/purchases.js
CHANGED
|
@@ -503,6 +503,22 @@ var Purchases = /** @class */ (function () {
|
|
|
503
503
|
});
|
|
504
504
|
});
|
|
505
505
|
};
|
|
506
|
+
/**
|
|
507
|
+
* Gets the storefront for the current store account.
|
|
508
|
+
* @returns {Promise<Storefront | null>} The storefront for the current store account, or null if the storefront is not available.
|
|
509
|
+
*/
|
|
510
|
+
Purchases.getStorefront = function () {
|
|
511
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
512
|
+
return __generator(this, function (_a) {
|
|
513
|
+
switch (_a.label) {
|
|
514
|
+
case 0: return [4 /*yield*/, Purchases.throwIfNotConfigured()];
|
|
515
|
+
case 1:
|
|
516
|
+
_a.sent();
|
|
517
|
+
return [2 /*return*/, RNPurchases.getStorefront()];
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
});
|
|
521
|
+
};
|
|
506
522
|
/**
|
|
507
523
|
* This function will logIn the current user with an appUserID. Typically this would be used after a log in
|
|
508
524
|
* to identify a user without calling configure.
|
package/ios/RNPurchases.m
CHANGED
|
@@ -155,6 +155,14 @@ RCT_REMAP_METHOD(getAppUserID,
|
|
|
155
155
|
resolve([RCCommonFunctionality appUserID]);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
RCT_REMAP_METHOD(getStorefront,
|
|
159
|
+
getStorefrontWithResolve:(RCTPromiseResolveBlock)resolve
|
|
160
|
+
reject:(RCTPromiseRejectBlock)reject) {
|
|
161
|
+
[RCCommonFunctionality getStorefrontWithCompletion:^(NSDictionary<NSString *,id> * _Nullable storefront) {
|
|
162
|
+
resolve(storefront);
|
|
163
|
+
}];
|
|
164
|
+
}
|
|
165
|
+
|
|
158
166
|
RCT_EXPORT_METHOD(logIn:(nonnull NSString *)appUserID
|
|
159
167
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
160
168
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
@@ -623,7 +631,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
|
|
|
623
631
|
}
|
|
624
632
|
|
|
625
633
|
- (NSString *)platformFlavorVersion {
|
|
626
|
-
return @"8.
|
|
634
|
+
return @"8.10.1";
|
|
627
635
|
}
|
|
628
636
|
|
|
629
637
|
@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": "8.
|
|
4
|
+
"version": "8.10.1",
|
|
5
5
|
"description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android. ",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -100,6 +100,6 @@
|
|
|
100
100
|
]
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@revenuecat/purchases-typescript-internal": "13.
|
|
103
|
+
"@revenuecat/purchases-typescript-internal": "13.32.0"
|
|
104
104
|
}
|
|
105
105
|
}
|