react-native-purchases 4.5.0 → 4.5.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.
@@ -24,6 +24,6 @@ Pod::Spec.new do |spec|
24
24
  ]
25
25
 
26
26
  spec.dependency "React-Core"
27
- spec.dependency "PurchasesHybridCommon", '1.11.1'
27
+ spec.dependency "PurchasesHybridCommon", '2.0.1'
28
28
  spec.swift_version = '5.0'
29
29
  end
@@ -29,7 +29,7 @@ android {
29
29
  minSdkVersion getExtOrIntegerDefault('minSdkVersion')
30
30
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
31
31
  versionCode 1
32
- versionName '4.5.0'
32
+ versionName '4.5.3'
33
33
  }
34
34
 
35
35
  buildTypes {
@@ -122,6 +122,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
122
122
  dependencies {
123
123
  //noinspection GradleDynamicVersion
124
124
  api 'com.facebook.react:react-native:+'
125
- implementation 'com.revenuecat.purchases:purchases-hybrid-common:1.11.1'
125
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:2.0.1'
126
126
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
127
127
  }
@@ -29,7 +29,7 @@ android {
29
29
  minSdkVersion getExtOrIntegerDefault('minSdkVersion')
30
30
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
31
31
  versionCode 1
32
- versionName '4.4.1'
32
+ versionName '4.5.2'
33
33
  }
34
34
 
35
35
  buildTypes {
@@ -122,6 +122,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
122
122
  dependencies {
123
123
  //noinspection GradleDynamicVersion
124
124
  api 'com.facebook.react:react-native:+'
125
- implementation 'com.revenuecat.purchases:purchases-hybrid-common:1.11.1'
125
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common:2.0.1'
126
126
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
127
127
  }
@@ -67,6 +67,16 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
67
67
  }
68
68
  }
69
69
 
70
+ @ReactMethod
71
+ public void addListener(String eventName) {
72
+ // Keep: Required for RN built in Event Emitter Calls.
73
+ }
74
+
75
+ @ReactMethod
76
+ public void removeListeners(Integer count) {
77
+ // Keep: Required for RN built in Event Emitter Calls.
78
+ }
79
+
70
80
  @ReactMethod
71
81
  public void setupPurchases(String apiKey, @Nullable String appUserID,
72
82
  boolean observerMode, @Nullable String userDefaultsSuiteName) {
package/ios/RNPurchases.h CHANGED
@@ -3,11 +3,7 @@
3
3
  // Copyright © 2019 RevenueCat. All rights reserved.
4
4
  //
5
5
 
6
- #if __has_include("RCTEventEmitter.h")
7
- #import "RCTEventEmitter.h"
8
- #else
9
6
  #import <React/RCTEventEmitter.h>
10
- #endif
11
7
 
12
8
  #import <Purchases/RCPurchases.h>
13
9
  #import <PurchasesHybridCommon/PurchasesHybridCommon.h>
package/ios/RNPurchases.m CHANGED
@@ -41,7 +41,8 @@ RCT_EXPORT_METHOD(setupPurchases:(NSString *)apiKey
41
41
  observerMode:observerMode
42
42
  userDefaultsSuiteName:userDefaultsSuiteName
43
43
  platformFlavor:self.platformFlavor
44
- platformFlavorVersion:self.platformFlavorVersion];
44
+ platformFlavorVersion:self.platformFlavorVersion
45
+ dangerousSettings:nil];
45
46
  RCPurchases.sharedPurchases.delegate = self;
46
47
  [RCCommonFunctionality configure];
47
48
  }
@@ -368,7 +369,7 @@ shouldPurchasePromoProduct:(SKProduct *)product
368
369
  }
369
370
 
370
371
  - (NSString *)platformFlavorVersion {
371
- return @"4.5.0";
372
+ return @"4.5.3";
372
373
  }
373
374
 
374
375
  @end
@@ -41,7 +41,8 @@ RCT_EXPORT_METHOD(setupPurchases:(NSString *)apiKey
41
41
  observerMode:observerMode
42
42
  userDefaultsSuiteName:userDefaultsSuiteName
43
43
  platformFlavor:self.platformFlavor
44
- platformFlavorVersion:self.platformFlavorVersion];
44
+ platformFlavorVersion:self.platformFlavorVersion
45
+ dangerousSettings:nil];
45
46
  RCPurchases.sharedPurchases.delegate = self;
46
47
  [RCCommonFunctionality configure];
47
48
  }
@@ -368,7 +369,7 @@ shouldPurchasePromoProduct:(SKProduct *)product
368
369
  }
369
370
 
370
371
  - (NSString *)platformFlavorVersion {
371
- return @"4.4.1";
372
+ return @"4.5.2";
372
373
  }
373
374
 
374
375
  @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": "4.5.0",
4
+ "version": "4.5.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
  "types": "dist/index.d.ts",
@@ -34,8 +34,8 @@
34
34
  "test": "jest",
35
35
  "tslint": "tslint -c tslint.json 'src/*.ts'",
36
36
  "prepublish": "tsc",
37
- "example": "yarn --cwd examples/purchaseTester",
38
- "pods": "cd examples/purchaseTester && pod-install --quiet",
37
+ "example": "(yarn --cwd examples/purchaseTester) && (yarn --cwd examples/purchaseTesterTypescript)",
38
+ "pods": "(cd examples/purchaseTester && npx pod-install --quiet) && (cd examples/purchaseTesterTypescript && npx pod-install --quiet)",
39
39
  "bootstrap": "yarn example && yarn && yarn pods"
40
40
  },
41
41
  "repository": {
package/scripts/build.js CHANGED
@@ -5,7 +5,7 @@ if (os.type() === "Linux") {
5
5
  console.log("Skipping iOS Dependencies");
6
6
  } else if (os.type() === "Darwin") {
7
7
  const downloadProcess = exec(
8
- "./scripts/download-purchases-framework.sh 3.13.1"
8
+ "./scripts/download-purchases-framework.sh 3.14.1"
9
9
  );
10
10
  downloadProcess.stdout.pipe(process.stdout);
11
11
  const downloadProcessCommon = exec(
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <classpath>
3
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
4
- <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5
- <classpathentry kind="output" path="bin/default"/>
6
- </classpath>
package/android/.project DELETED
@@ -1,34 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <projectDescription>
3
- <name>android</name>
4
- <comment>Project ReactNativeSample-react-native-purchases created by Buildship.</comment>
5
- <projects>
6
- </projects>
7
- <buildSpec>
8
- <buildCommand>
9
- <name>org.eclipse.jdt.core.javabuilder</name>
10
- <arguments>
11
- </arguments>
12
- </buildCommand>
13
- <buildCommand>
14
- <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15
- <arguments>
16
- </arguments>
17
- </buildCommand>
18
- </buildSpec>
19
- <natures>
20
- <nature>org.eclipse.jdt.core.javanature</nature>
21
- <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
- </natures>
23
- <filteredResources>
24
- <filter>
25
- <id>0</id>
26
- <name></name>
27
- <type>30</type>
28
- <matcher>
29
- <id>org.eclipse.core.resources.regexFilterMatcher</id>
30
- <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31
- </matcher>
32
- </filter>
33
- </filteredResources>
34
- </projectDescription>
@@ -1,13 +0,0 @@
1
- arguments=
2
- auto.sync=false
3
- build.scans.enabled=false
4
- connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5
- connection.project.dir=
6
- eclipse.preferences.version=1
7
- gradle.user.home=
8
- java.home=/Users/cesardelavega/.sdkman/candidates/java/current
9
- jvm.arguments=
10
- offline.mode=false
11
- override.workspace.settings=true
12
- show.console.view=true
13
- show.executions.view=true
@@ -1,19 +0,0 @@
1
- const {exec} = require("child_process");
2
- const os = require("os");
3
-
4
- if (os.type() === "Linux") {
5
- console.log("Skipping iOS Dependencies");
6
- } else if (os.type() === "Darwin") {
7
- const downloadProcess = exec(
8
- "./scripts/download-purchases-framework.sh 3.13.1"
9
- );
10
- downloadProcess.stdout.pipe(process.stdout);
11
- const downloadProcessCommon = exec(
12
- "./scripts/download-purchases-common.sh 1.10.1"
13
- );
14
- downloadProcessCommon.stdout.pipe(process.stdout);
15
- } else if (os.type() === "Windows_NT") {
16
- console.log("Skipping iOS Dependencies");
17
- } else {
18
- throw new Error(`Unsupported OS found: ${os.type()}`);
19
- }