react-native-purchases 4.3.3 → 4.4.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.
- package/RNPurchases.podspec +3 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/revenuecat/purchases/react/RNPurchasesModule.java +6 -1
- package/dist/purchases.d.ts +7 -0
- package/dist/purchases.js +9 -0
- package/ios/RNPurchases.m +5 -1
- package/package.json +1 -1
- package/scripts/build.js +2 -2
- package/android/.classpath +0 -6
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
package/RNPurchases.podspec
CHANGED
|
@@ -16,13 +16,14 @@ Pod::Spec.new do |spec|
|
|
|
16
16
|
spec.source_files = "ios/**/*.{h,m,swift}"
|
|
17
17
|
spec.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
|
18
18
|
|
|
19
|
-
# Ignore the
|
|
19
|
+
# Ignore the Purchases.framework that would get downloaded by the download script, meant for
|
|
20
|
+
# developers who don't want to use Cocoapods
|
|
20
21
|
spec.exclude_files = [
|
|
21
22
|
"ios/Purchases.framework",
|
|
22
23
|
"ios/PurchasesHybridCommon.framework"
|
|
23
24
|
]
|
|
24
25
|
|
|
25
26
|
spec.dependency "React-Core"
|
|
26
|
-
spec.dependency "PurchasesHybridCommon", '1.
|
|
27
|
+
spec.dependency "PurchasesHybridCommon", '1.10.0'
|
|
27
28
|
spec.swift_version = '5.0'
|
|
28
29
|
end
|
package/android/build.gradle
CHANGED
|
@@ -29,7 +29,7 @@ android {
|
|
|
29
29
|
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
30
30
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
31
31
|
versionCode 1
|
|
32
|
-
versionName '4.
|
|
32
|
+
versionName '4.4.0'
|
|
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.
|
|
125
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common:1.10.0'
|
|
126
126
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
127
127
|
}
|
|
@@ -43,7 +43,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
43
43
|
|
|
44
44
|
private static final String PURCHASER_INFO_UPDATED = "Purchases-PurchaserInfoUpdated";
|
|
45
45
|
public static final String PLATFORM_NAME = "react-native";
|
|
46
|
-
public static final String PLUGIN_VERSION = "4.
|
|
46
|
+
public static final String PLUGIN_VERSION = "4.4.0";
|
|
47
47
|
|
|
48
48
|
private final ReactApplicationContext reactContext;
|
|
49
49
|
|
|
@@ -296,6 +296,11 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
296
296
|
SubscriberAttributesKt.setOnesignalID(onesignalID);
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
@ReactMethod
|
|
300
|
+
public void setAirshipChannelID(String airshipChannelID) {
|
|
301
|
+
SubscriberAttributesKt.setAirshipChannelID(airshipChannelID);
|
|
302
|
+
}
|
|
303
|
+
|
|
299
304
|
// endregion
|
|
300
305
|
|
|
301
306
|
// region Campaign parameters
|
package/dist/purchases.d.ts
CHANGED
|
@@ -435,6 +435,13 @@ export default class Purchases {
|
|
|
435
435
|
* @param onesignalID Empty String or null will delete the subscriber attribute.
|
|
436
436
|
*/
|
|
437
437
|
static setOnesignalID(onesignalID: string | null): void;
|
|
438
|
+
/**
|
|
439
|
+
* Subscriber attribute associated with the Airship Channel Id for the user
|
|
440
|
+
* Required for the RevenueCat Airship integration
|
|
441
|
+
*
|
|
442
|
+
* @param airshipChannelID Empty String or null will delete the subscriber attribute.
|
|
443
|
+
*/
|
|
444
|
+
static setAirshipChannelID(airshipChannelID: string | null): void;
|
|
438
445
|
/**
|
|
439
446
|
* Subscriber attribute associated with the install media source for the user
|
|
440
447
|
*
|
package/dist/purchases.js
CHANGED
|
@@ -523,6 +523,15 @@ var Purchases = /** @class */ (function () {
|
|
|
523
523
|
Purchases.setOnesignalID = function (onesignalID) {
|
|
524
524
|
RNPurchases.setOnesignalID(onesignalID);
|
|
525
525
|
};
|
|
526
|
+
/**
|
|
527
|
+
* Subscriber attribute associated with the Airship Channel Id for the user
|
|
528
|
+
* Required for the RevenueCat Airship integration
|
|
529
|
+
*
|
|
530
|
+
* @param airshipChannelID Empty String or null will delete the subscriber attribute.
|
|
531
|
+
*/
|
|
532
|
+
Purchases.setAirshipChannelID = function (airshipChannelID) {
|
|
533
|
+
RNPurchases.setAirshipChannelID(airshipChannelID);
|
|
534
|
+
};
|
|
526
535
|
/**
|
|
527
536
|
* Subscriber attribute associated with the install media source for the user
|
|
528
537
|
*
|
package/ios/RNPurchases.m
CHANGED
|
@@ -283,6 +283,10 @@ RCT_EXPORT_METHOD(setOnesignalID:(NSString *)onesignalID) {
|
|
|
283
283
|
[RCCommonFunctionality setOnesignalID:onesignalID];
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
RCT_EXPORT_METHOD(setAirshipChannelID:(NSString *)airshipChannelID) {
|
|
287
|
+
[RCCommonFunctionality setAirshipChannelID:airshipChannelID];
|
|
288
|
+
}
|
|
289
|
+
|
|
286
290
|
# pragma mark Campaign parameters
|
|
287
291
|
|
|
288
292
|
RCT_EXPORT_METHOD(setMediaSource:(NSString *)mediaSource) {
|
|
@@ -358,7 +362,7 @@ shouldPurchasePromoProduct:(SKProduct *)product
|
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
- (NSString *)platformFlavorVersion {
|
|
361
|
-
return @"4.
|
|
365
|
+
return @"4.4.0";
|
|
362
366
|
}
|
|
363
367
|
|
|
364
368
|
@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.
|
|
4
|
+
"version": "4.4.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",
|
package/scripts/build.js
CHANGED
|
@@ -5,11 +5,11 @@ 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.
|
|
8
|
+
"./scripts/download-purchases-framework.sh 3.13.0"
|
|
9
9
|
);
|
|
10
10
|
downloadProcess.stdout.pipe(process.stdout);
|
|
11
11
|
const downloadProcessCommon = exec(
|
|
12
|
-
"./scripts/download-purchases-common.sh 1.
|
|
12
|
+
"./scripts/download-purchases-common.sh 1.10.0"
|
|
13
13
|
);
|
|
14
14
|
downloadProcessCommon.stdout.pipe(process.stdout);
|
|
15
15
|
} else if (os.type() === "Windows_NT") {
|
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>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
|