react-native-purchases 7.27.4 → 7.28.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 '7.
|
|
32
|
+
versionName '7.28.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:
|
|
124
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common:11.1.1'
|
|
125
125
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
126
126
|
}
|
|
@@ -19,6 +19,7 @@ import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
|
19
19
|
import com.revenuecat.purchases.CustomerInfo;
|
|
20
20
|
import com.revenuecat.purchases.DangerousSettings;
|
|
21
21
|
import com.revenuecat.purchases.Purchases;
|
|
22
|
+
import com.revenuecat.purchases.PurchasesAreCompletedBy;
|
|
22
23
|
import com.revenuecat.purchases.Store;
|
|
23
24
|
import com.revenuecat.purchases.common.PlatformInfo;
|
|
24
25
|
import com.revenuecat.purchases.hybridcommon.CommonKt;
|
|
@@ -46,7 +47,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
46
47
|
private static final String CUSTOMER_INFO_UPDATED = "Purchases-CustomerInfoUpdated";
|
|
47
48
|
private static final String LOG_HANDLER_EVENT = "Purchases-LogHandlerEvent";
|
|
48
49
|
public static final String PLATFORM_NAME = "react-native";
|
|
49
|
-
public static final String PLUGIN_VERSION = "7.
|
|
50
|
+
public static final String PLUGIN_VERSION = "7.28.1";
|
|
50
51
|
|
|
51
52
|
private final ReactApplicationContext reactContext;
|
|
52
53
|
|
|
@@ -95,7 +96,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
95
96
|
reactContext,
|
|
96
97
|
apiKey,
|
|
97
98
|
appUserID,
|
|
98
|
-
observerMode,
|
|
99
|
+
observerMode ? PurchasesAreCompletedBy.MY_APP : PurchasesAreCompletedBy.REVENUECAT,
|
|
99
100
|
platformInfo,
|
|
100
101
|
store,
|
|
101
102
|
new DangerousSettings(),
|
|
@@ -276,7 +277,8 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
276
277
|
|
|
277
278
|
@ReactMethod
|
|
278
279
|
public void setFinishTransactions(boolean enabled) {
|
|
279
|
-
CommonKt.
|
|
280
|
+
CommonKt.setPurchasesAreCompletedBy(enabled ?
|
|
281
|
+
PurchasesAreCompletedBy.REVENUECAT : PurchasesAreCompletedBy.MY_APP);
|
|
280
282
|
}
|
|
281
283
|
|
|
282
284
|
@ReactMethod
|
|
@@ -311,8 +313,9 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
311
313
|
}
|
|
312
314
|
|
|
313
315
|
@ReactMethod
|
|
314
|
-
public void setProxyURLString(String proxyURLString) {
|
|
316
|
+
public void setProxyURLString(String proxyURLString, Promise promise) {
|
|
315
317
|
CommonKt.setProxyURLString(proxyURLString);
|
|
318
|
+
promise.resolve(null); // Resolve the promise with no value
|
|
316
319
|
}
|
|
317
320
|
|
|
318
321
|
@ReactMethod
|
package/dist/purchases.d.ts
CHANGED
|
@@ -454,8 +454,7 @@ export default class Purchases {
|
|
|
454
454
|
/**
|
|
455
455
|
* Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value
|
|
456
456
|
* from your RevenueCat contact.
|
|
457
|
-
* @returns {Promise<void>} The promise
|
|
458
|
-
* setting the proxy url.
|
|
457
|
+
* @returns {Promise<void>} The promise to be returned after setting the proxy has been completed.
|
|
459
458
|
*/
|
|
460
459
|
static setProxyURL(url: string): Promise<void>;
|
|
461
460
|
/**
|
package/dist/purchases.js
CHANGED
|
@@ -905,19 +905,12 @@ var Purchases = /** @class */ (function () {
|
|
|
905
905
|
/**
|
|
906
906
|
* Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value
|
|
907
907
|
* from your RevenueCat contact.
|
|
908
|
-
* @returns {Promise<void>} The promise
|
|
909
|
-
* setting the proxy url.
|
|
908
|
+
* @returns {Promise<void>} The promise to be returned after setting the proxy has been completed.
|
|
910
909
|
*/
|
|
911
910
|
Purchases.setProxyURL = function (url) {
|
|
912
911
|
return __awaiter(this, void 0, void 0, function () {
|
|
913
912
|
return __generator(this, function (_a) {
|
|
914
|
-
|
|
915
|
-
case 0: return [4 /*yield*/, Purchases.throwIfNotConfigured()];
|
|
916
|
-
case 1:
|
|
917
|
-
_a.sent();
|
|
918
|
-
RNPurchases.setProxyURLString(url);
|
|
919
|
-
return [2 /*return*/];
|
|
920
|
-
}
|
|
913
|
+
return [2 /*return*/, RNPurchases.setProxyURLString(url)];
|
|
921
914
|
});
|
|
922
915
|
});
|
|
923
916
|
};
|
package/ios/RNPurchases.m
CHANGED
|
@@ -47,7 +47,7 @@ RCT_EXPORT_METHOD(setupPurchases:(NSString *)apiKey
|
|
|
47
47
|
entitlementVerificationMode:(nullable NSString *)entitlementVerificationMode) {
|
|
48
48
|
RCPurchases *purchases = [RCPurchases configureWithAPIKey:apiKey
|
|
49
49
|
appUserID:appUserID
|
|
50
|
-
|
|
50
|
+
purchasesAreCompletedBy:(observerMode ? RCPurchasesAreCompletedByMyApp : RCPurchasesAreCompletedByRevenueCat)
|
|
51
51
|
userDefaultsSuiteName:userDefaultsSuiteName
|
|
52
52
|
platformFlavor:self.platformFlavor
|
|
53
53
|
platformFlavorVersion:self.platformFlavorVersion
|
|
@@ -66,7 +66,11 @@ RCT_EXPORT_METHOD(setAllowSharingStoreAccount:(BOOL)allowSharingStoreAccount) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
RCT_EXPORT_METHOD(setFinishTransactions:(BOOL)finishTransactions) {
|
|
69
|
-
|
|
69
|
+
if (finishTransactions) {
|
|
70
|
+
[RCCommonFunctionality setPurchasesAreCompletedBy:RCPurchasesAreCompletedByRevenueCat];
|
|
71
|
+
} else {
|
|
72
|
+
[RCCommonFunctionality setPurchasesAreCompletedBy:RCPurchasesAreCompletedByMyApp];
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
RCT_REMAP_METHOD(getOfferings,
|
|
@@ -256,8 +260,11 @@ static void logUnavailablePresentCodeRedemptionSheet() {
|
|
|
256
260
|
|
|
257
261
|
#pragma mark - Subscriber Attributes
|
|
258
262
|
|
|
259
|
-
RCT_EXPORT_METHOD(setProxyURLString:(nullable NSString *)proxyURLString
|
|
263
|
+
RCT_EXPORT_METHOD(setProxyURLString:(nullable NSString *)proxyURLString
|
|
264
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
265
|
+
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
260
266
|
[RCCommonFunctionality setProxyURLString:proxyURLString];
|
|
267
|
+
resolve(nil); // Resolve the promise with no value
|
|
261
268
|
}
|
|
262
269
|
|
|
263
270
|
RCT_EXPORT_METHOD(setAttributes:(NSDictionary *)attributes) {
|
|
@@ -494,7 +501,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
|
|
|
494
501
|
}
|
|
495
502
|
|
|
496
503
|
- (NSString *)platformFlavorVersion {
|
|
497
|
-
return @"7.
|
|
504
|
+
return @"7.28.1";
|
|
498
505
|
}
|
|
499
506
|
|
|
500
507
|
@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": "7.
|
|
4
|
+
"version": "7.28.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": "
|
|
103
|
+
"@revenuecat/purchases-typescript-internal": "11.1.1"
|
|
104
104
|
}
|
|
105
105
|
}
|