react-native-purchases 9.10.2 → 9.10.3

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.10.2'
32
+ versionName '9.10.3'
33
33
  }
34
34
 
35
35
  buildTypes {
@@ -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.10.2";
54
+ public static final String PLUGIN_VERSION = "9.10.3";
55
55
 
56
56
  private final ReactApplicationContext reactContext;
57
57
 
package/dist/purchases.js CHANGED
@@ -665,7 +665,7 @@ var Purchases = /** @class */ (function () {
665
665
  /**
666
666
  * Sets a function to be called when a feature event is tracked by RevenueCatUI.
667
667
  * This is a debug API for monitoring paywall and customer center events not meant for public use.
668
- * Currently only works on Android.
668
+ * Currently only works on Android and iOS.
669
669
  * @internal
670
670
  * @param {TrackedEventListener} trackedEventListener TrackedEvent listener
671
671
  */
@@ -677,7 +677,7 @@ var Purchases = /** @class */ (function () {
677
677
  case 0: return [4 /*yield*/, Purchases.throwIfNotConfigured()];
678
678
  case 1:
679
679
  _a.sent();
680
- if (react_native_2.Platform.OS === "android") {
680
+ if (react_native_2.Platform.OS === "android" || react_native_2.Platform.OS === "ios") {
681
681
  if (typeof trackedEventListener !== "function") {
682
682
  throw new Error("addTrackedEventListener needs a function");
683
683
  }
package/ios/RNPurchases.m CHANGED
@@ -566,6 +566,12 @@ RCT_EXPORT_METHOD(setLogHandler) {
566
566
  }];
567
567
  }
568
568
 
569
+ RCT_EXPORT_METHOD(setTrackedEventListener) {
570
+ [RCCommonFunctionality setTrackedEventListenerOnEventReceived:^(NSDictionary<NSString *, id> * _Nonnull eventDetails) {
571
+ [self sendEventWithName:RNPurchasesTrackedEvent body:eventDetails];
572
+ }];
573
+ }
574
+
569
575
  RCT_EXPORT_METHOD(isWebPurchaseRedemptionURL:(NSString *)urlString
570
576
  resolve:(RCTPromiseResolveBlock)resolve
571
577
  reject:(RCTPromiseRejectBlock)reject) {
@@ -675,7 +681,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
675
681
  }
676
682
 
677
683
  - (NSString *)platformFlavorVersion {
678
- return @"9.10.2";
684
+ return @"9.10.3";
679
685
  }
680
686
 
681
687
  @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.10.2",
4
+ "version": "9.10.3",
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",