react-native-purchases 9.4.1 → 9.4.2

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.
@@ -29,7 +29,7 @@ android {
29
29
  minSdkVersion getExtOrIntegerDefault('minSdkVersion')
30
30
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
31
31
  versionCode 1
32
- versionName '9.4.1'
32
+ versionName '9.4.2'
33
33
  }
34
34
 
35
35
  buildTypes {
@@ -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 = "9.4.1";
50
+ public static final String PLUGIN_VERSION = "9.4.2";
51
51
 
52
52
  private final ReactApplicationContext reactContext;
53
53
 
@@ -88,7 +88,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
88
88
  boolean shouldShowInAppMessagesAutomatically,
89
89
  @Nullable String entitlementVerificationMode,
90
90
  boolean pendingTransactionsForPrepaidPlansEnabled,
91
- boolean diagnosticsEnabled,
91
+ boolean diagnosticsEnabled,
92
92
  boolean automaticDeviceIdentifierCollectionEnabled,
93
93
  @Nullable String preferredUILocaleOverride) {
94
94
  PlatformInfo platformInfo = new PlatformInfo(PLATFORM_NAME, PLUGIN_VERSION);
@@ -176,7 +176,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
176
176
  }
177
177
 
178
178
  CommonKt.purchaseProduct(
179
- getCurrentActivity(),
179
+ getReactApplicationContext().getCurrentActivity(),
180
180
  productIdentifier,
181
181
  type,
182
182
  null,
@@ -201,7 +201,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
201
201
  Map<String, Object> mapPresentedOfferingContext = presentedOfferingContext.toHashMap();
202
202
 
203
203
  CommonKt.purchasePackage(
204
- getCurrentActivity(),
204
+ getReactApplicationContext().getCurrentActivity(),
205
205
  packageIdentifier,
206
206
  mapPresentedOfferingContext,
207
207
  googleUpgradeInfo.getOldProductIdentifier(),
@@ -228,7 +228,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
228
228
  }
229
229
 
230
230
  CommonKt.purchaseSubscriptionOption(
231
- getCurrentActivity(),
231
+ getReactApplicationContext().getCurrentActivity(),
232
232
  productIdentifer,
233
233
  optionIdentifier,
234
234
  googleUpgradeInfo.getOldProductIdentifier(),
@@ -348,7 +348,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
348
348
  }
349
349
 
350
350
  //================================================================================
351
- // Virtual Currencies
351
+ // Virtual Currencies
352
352
  //================================================================================
353
353
  @ReactMethod
354
354
  public void getVirtualCurrencies(final Promise promise) {
@@ -540,7 +540,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
540
540
  @ReactMethod
541
541
  public void showInAppMessages(ReadableArray messageTypes, final Promise promise) {
542
542
  if (messageTypes == null) {
543
- CommonKt.showInAppMessagesIfNeeded(getCurrentActivity());
543
+ CommonKt.showInAppMessagesIfNeeded(getReactApplicationContext().getCurrentActivity());
544
544
  } else {
545
545
  ArrayList<InAppMessageType> messageTypesList = new ArrayList<>();
546
546
  InAppMessageType[] inAppMessageTypes = InAppMessageType.values();
@@ -556,7 +556,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
556
556
  Log.e("RNPurchases", "Invalid in-app message type: " + messageTypeInt);
557
557
  }
558
558
  }
559
- CommonKt.showInAppMessagesIfNeeded(getCurrentActivity(), messageTypesList);
559
+ CommonKt.showInAppMessagesIfNeeded(getReactApplicationContext().getCurrentActivity(), messageTypesList);
560
560
  }
561
561
  promise.resolve(null);
562
562
  }
package/ios/RNPurchases.m CHANGED
@@ -665,7 +665,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
665
665
  }
666
666
 
667
667
  - (NSString *)platformFlavorVersion {
668
- return @"9.4.1";
668
+ return @"9.4.2";
669
669
  }
670
670
 
671
671
  @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.1",
4
+ "version": "9.4.2",
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",