react-native-purchases 7.27.4 → 7.28.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.
@@ -25,6 +25,6 @@ Pod::Spec.new do |spec|
25
25
  ]
26
26
 
27
27
  spec.dependency "React-Core"
28
- spec.dependency "PurchasesHybridCommon", '10.9.0'
28
+ spec.dependency "PurchasesHybridCommon", '11.1.1'
29
29
  spec.swift_version = '5.7'
30
30
  end
@@ -29,7 +29,7 @@ android {
29
29
  minSdkVersion getExtOrIntegerDefault('minSdkVersion')
30
30
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
31
31
  versionCode 1
32
- versionName '7.27.4'
32
+ versionName '7.28.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:10.9.0'
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.27.4";
50
+ public static final String PLUGIN_VERSION = "7.28.0";
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.setFinishTransactions(enabled);
280
+ CommonKt.setPurchasesAreCompletedBy(enabled ?
281
+ PurchasesAreCompletedBy.REVENUECAT : PurchasesAreCompletedBy.MY_APP);
280
282
  }
281
283
 
282
284
  @ReactMethod
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
- observerMode:observerMode
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
- [RCCommonFunctionality setFinishTransactions:finishTransactions];
69
+ if (finishTransactions) {
70
+ [RCCommonFunctionality setPurchasesAreCompletedBy:RCPurchasesAreCompletedByRevenueCat];
71
+ } else {
72
+ [RCCommonFunctionality setPurchasesAreCompletedBy:RCPurchasesAreCompletedByMyApp];
73
+ }
70
74
  }
71
75
 
72
76
  RCT_REMAP_METHOD(getOfferings,
@@ -494,7 +498,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
494
498
  }
495
499
 
496
500
  - (NSString *)platformFlavorVersion {
497
- return @"7.27.4";
501
+ return @"7.28.0";
498
502
  }
499
503
 
500
504
  @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.27.4",
4
+ "version": "7.28.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
  "types": "dist/index.d.ts",
@@ -100,6 +100,6 @@
100
100
  ]
101
101
  },
102
102
  "dependencies": {
103
- "@revenuecat/purchases-typescript-internal": "10.9.0"
103
+ "@revenuecat/purchases-typescript-internal": "11.1.1"
104
104
  }
105
105
  }