react-native-purchases 4.6.0 → 5.0.0-beta.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.
- package/README.md +11 -19
- package/RNPurchases.podspec +2 -2
- package/android/build.gradle +3 -4
- package/android/build.gradle.bck +3 -4
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/revenuecat/purchases/react/RNPurchasesModule.java +18 -42
- package/android/src/main/java/com/revenuecat/purchases/react/RNPurchasesModule.java.bck +374 -0
- package/dist/{purchaserInfo.d.ts → customerInfo.d.ts} +4 -5
- package/dist/{purchaserInfo.js → customerInfo.js} +0 -0
- package/dist/errors.d.ts +3 -0
- package/dist/errors.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/offerings.d.ts +12 -44
- package/dist/offerings.js +4 -0
- package/dist/purchases.d.ts +55 -114
- package/dist/purchases.js +55 -160
- package/ios/RNPurchases.h +2 -2
- package/ios/RNPurchases.m +41 -74
- package/ios/RNPurchases.m.bck +39 -72
- package/package.json +5 -6
- package/scripts/{build.js → build.js.bck} +0 -0
- package/scripts/docs/index.html +9 -0
- package/scripts/docs/index.html.bck +9 -0
- package/scripts/setupJest.js +253 -243
- package/android/.classpath +0 -6
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/scripts/download-purchases-common.sh +0 -39
- package/scripts/download-purchases-framework.sh +0 -39
package/android/.classpath
DELETED
|
@@ -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>react-native-purchases</name>
|
|
4
|
-
<comment>Project 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>1635967466942</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(VERSION(7.1.1))
|
|
5
|
-
connection.project.dir=
|
|
6
|
-
eclipse.preferences.version=1
|
|
7
|
-
gradle.user.home=
|
|
8
|
-
java.home=/Users/madelinebeyl/.sdkman/candidates/java/11.0.11.hs-adpt
|
|
9
|
-
jvm.arguments=
|
|
10
|
-
offline.mode=false
|
|
11
|
-
override.workspace.settings=true
|
|
12
|
-
show.console.view=true
|
|
13
|
-
show.executions.view=true
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
cd ios/
|
|
4
|
-
|
|
5
|
-
VERSION=$1
|
|
6
|
-
CURRENT_VERSION=$(cat .common_version)
|
|
7
|
-
|
|
8
|
-
if [ "$VERSION" == "$CURRENT_VERSION" ]; then
|
|
9
|
-
echo "The newest version is already installed. Exiting."
|
|
10
|
-
exit 0
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
pwd
|
|
14
|
-
|
|
15
|
-
URL=https://github.com/RevenueCat/purchases-hybrid-common/releases/download/$VERSION/PurchasesHybridCommon.framework.zip
|
|
16
|
-
|
|
17
|
-
echo "Downloading Purchases common hybrid SDKs classes $VERSION from $URL, this may take a minute."
|
|
18
|
-
|
|
19
|
-
if ! which curl > /dev/null; then echo "curl command not found. Please install curl"; exit 1; fi;
|
|
20
|
-
if ! which unzip > /dev/null; then echo "unzip command not found. Please install unzip"; exit 1; fi;
|
|
21
|
-
|
|
22
|
-
if [ -d ./PurchasesHybridCommon.framework ]; then
|
|
23
|
-
echo "Old classes found. Removing them and installing version $VERSION"
|
|
24
|
-
rm -rf ./PurchasesHybridCommon.framework
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
curl -sSL $URL > tempCommon.zip
|
|
28
|
-
# In some cases the temp folder can not be created by unzip, https://github.com/RevenueCat/react-native-purchases/issues/26
|
|
29
|
-
mkdir -p tempCommon
|
|
30
|
-
unzip -o tempCommon.zip -d tempCommon
|
|
31
|
-
mv tempCommon/Carthage/Build/iOS/PurchasesHybridCommon.framework ./PurchasesHybridCommon.framework
|
|
32
|
-
rm -r tempCommon
|
|
33
|
-
rm tempCommon.zip
|
|
34
|
-
|
|
35
|
-
if ! [ -d ./PurchasesHybridCommon.framework ]; then
|
|
36
|
-
echo "Common files not found. Please reinstall react-native-purchases"; exit 1;
|
|
37
|
-
fi;
|
|
38
|
-
|
|
39
|
-
echo "$VERSION" > .common_version
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
cd ios/
|
|
4
|
-
|
|
5
|
-
VERSION=$1
|
|
6
|
-
CURRENT_VERSION=$(cat .framework_version)
|
|
7
|
-
|
|
8
|
-
if [ "$VERSION" == "$CURRENT_VERSION" ]; then
|
|
9
|
-
echo "The newest version is already installed. Exiting."
|
|
10
|
-
exit 0
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
pwd
|
|
14
|
-
|
|
15
|
-
URL=https://github.com/RevenueCat/purchases-ios/releases/download/$VERSION/Purchases.framework.zip
|
|
16
|
-
|
|
17
|
-
echo "Downloading Purchases iOS $VERSION from $URL, this may take a minute."
|
|
18
|
-
|
|
19
|
-
if ! which curl > /dev/null; then echo "curl command not found. Please install curl"; exit 1; fi;
|
|
20
|
-
if ! which unzip > /dev/null; then echo "unzip command not found. Please install unzip"; exit 1; fi;
|
|
21
|
-
|
|
22
|
-
if [ -d ./Purchases.framework ]; then
|
|
23
|
-
echo "Old Purchases.framework found. Removing it and installing a $VERSION"
|
|
24
|
-
rm -rf ./Purchases.framework
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
curl -sSL $URL > temp.zip
|
|
28
|
-
# In some cases the temp folder can not be created by unzip, https://github.com/RevenueCat/react-native-purchases/issues/26
|
|
29
|
-
mkdir -p temp
|
|
30
|
-
unzip -o temp.zip -d temp
|
|
31
|
-
mv temp/Carthage/Build/iOS/Purchases.framework ./Purchases.framework
|
|
32
|
-
rm -r temp
|
|
33
|
-
rm temp.zip
|
|
34
|
-
|
|
35
|
-
if ! [ -d ./Purchases.framework ]; then
|
|
36
|
-
echo "Purchases.framework not found. Please reinstall react-native-purchases"; exit 1;
|
|
37
|
-
fi;
|
|
38
|
-
|
|
39
|
-
echo "$VERSION" > .framework_version
|