react-native-purchases 10.8.1 → 10.9.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/android/build.gradle +1 -1
- package/android/src/main/java/com/revenuecat/purchases/react/RNPurchasesModule.java +6 -1
- package/dist/browser/nativeModule.d.ts +1 -0
- package/dist/browser/nativeModule.js +7 -1
- package/dist/purchases.d.ts +13 -0
- package/dist/purchases.js +25 -0
- package/ios/RNPurchases.m +5 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -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 = "10.
|
|
54
|
+
public static final String PLUGIN_VERSION = "10.9.0";
|
|
55
55
|
|
|
56
56
|
private final ReactApplicationContext reactContext;
|
|
57
57
|
|
|
@@ -501,6 +501,11 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
501
501
|
SubscriberAttributesKt.setKochavaDeviceID(kochavaDeviceID);
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
+
@ReactMethod
|
|
505
|
+
public void setSingularDeviceID(String singularDeviceID) {
|
|
506
|
+
SubscriberAttributesKt.setSingularDeviceID(singularDeviceID);
|
|
507
|
+
}
|
|
508
|
+
|
|
504
509
|
@ReactMethod
|
|
505
510
|
public void setOnesignalID(String onesignalID) {
|
|
506
511
|
SubscriberAttributesKt.setOnesignalID(onesignalID);
|
|
@@ -63,6 +63,7 @@ export declare const browserNativeModuleRNPurchases: {
|
|
|
63
63
|
setFirebaseAppInstanceID: (_firebaseAppInstanceID: string) => Promise<void>;
|
|
64
64
|
setTenjinAnalyticsInstallationID: (_tenjinAnalyticsInstallationID: string) => Promise<void>;
|
|
65
65
|
setKochavaDeviceID: (_kochavaDeviceID: string) => Promise<void>;
|
|
66
|
+
setSingularDeviceID: (_singularDeviceID: string) => Promise<void>;
|
|
66
67
|
setOnesignalID: (_onesignalID: string) => Promise<void>;
|
|
67
68
|
setOnesignalUserID: (_onesignalUserID: string) => Promise<void>;
|
|
68
69
|
setAirshipChannelID: (_airshipChannelID: string) => Promise<void>;
|
|
@@ -43,7 +43,7 @@ var typeGuards_1 = require("./typeGuards");
|
|
|
43
43
|
var environment_1 = require("../utils/environment");
|
|
44
44
|
var utils_1 = require("./utils");
|
|
45
45
|
var purchaseSimulatedPackageHelper_1 = require("./simulatedstore/purchaseSimulatedPackageHelper");
|
|
46
|
-
var packageVersion = '10.
|
|
46
|
+
var packageVersion = '10.9.0';
|
|
47
47
|
/**
|
|
48
48
|
* Browser implementation of the native module. This will be used in the browser and Expo Go.
|
|
49
49
|
*/
|
|
@@ -457,6 +457,12 @@ exports.browserNativeModuleRNPurchases = {
|
|
|
457
457
|
return [2 /*return*/];
|
|
458
458
|
});
|
|
459
459
|
}); },
|
|
460
|
+
setSingularDeviceID: function (_singularDeviceID) { return __awaiter(void 0, void 0, void 0, function () {
|
|
461
|
+
return __generator(this, function (_a) {
|
|
462
|
+
(0, utils_1.methodNotSupportedOnWeb)('setSingularDeviceID');
|
|
463
|
+
return [2 /*return*/];
|
|
464
|
+
});
|
|
465
|
+
}); },
|
|
460
466
|
setOnesignalID: function (_onesignalID) { return __awaiter(void 0, void 0, void 0, function () {
|
|
461
467
|
return __generator(this, function (_a) {
|
|
462
468
|
(0, utils_1.methodNotSupportedOnWeb)('setOnesignalID');
|
package/dist/purchases.d.ts
CHANGED
|
@@ -829,6 +829,19 @@ export default class Purchases {
|
|
|
829
829
|
* setting the Kochava Device ID.
|
|
830
830
|
*/
|
|
831
831
|
static setKochavaDeviceID(kochavaDeviceID: string | null): Promise<void>;
|
|
832
|
+
/**
|
|
833
|
+
* Subscriber attribute associated with the Singular Device ID (SDID) for the user.
|
|
834
|
+
* Required for the RevenueCat Singular integration when using Singular's Event
|
|
835
|
+
* Endpoint V2.
|
|
836
|
+
*
|
|
837
|
+
* The SDID is generated by the Singular SDK and cannot be collected by
|
|
838
|
+
* collectDeviceIdentifiers, so it has to be forwarded by the app.
|
|
839
|
+
*
|
|
840
|
+
* @param singularDeviceID Singular device ID to use in the Singular integration. Empty String or null will delete the subscriber attribute.
|
|
841
|
+
* @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error
|
|
842
|
+
* setting the Singular Device ID.
|
|
843
|
+
*/
|
|
844
|
+
static setSingularDeviceID(singularDeviceID: string | null): Promise<void>;
|
|
832
845
|
/**
|
|
833
846
|
* Subscriber attribute associated with the OneSignal Player Id for the user
|
|
834
847
|
* Required for the RevenueCat OneSignal integration with OneSignal SDK v4.0 and below
|
package/dist/purchases.js
CHANGED
|
@@ -1546,6 +1546,31 @@ var Purchases = /** @class */ (function () {
|
|
|
1546
1546
|
});
|
|
1547
1547
|
});
|
|
1548
1548
|
};
|
|
1549
|
+
/**
|
|
1550
|
+
* Subscriber attribute associated with the Singular Device ID (SDID) for the user.
|
|
1551
|
+
* Required for the RevenueCat Singular integration when using Singular's Event
|
|
1552
|
+
* Endpoint V2.
|
|
1553
|
+
*
|
|
1554
|
+
* The SDID is generated by the Singular SDK and cannot be collected by
|
|
1555
|
+
* collectDeviceIdentifiers, so it has to be forwarded by the app.
|
|
1556
|
+
*
|
|
1557
|
+
* @param singularDeviceID Singular device ID to use in the Singular integration. Empty String or null will delete the subscriber attribute.
|
|
1558
|
+
* @returns {Promise<void>} The promise will be rejected if configure has not been called yet or if there's an error
|
|
1559
|
+
* setting the Singular Device ID.
|
|
1560
|
+
*/
|
|
1561
|
+
Purchases.setSingularDeviceID = function (singularDeviceID) {
|
|
1562
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1563
|
+
return __generator(this, function (_a) {
|
|
1564
|
+
switch (_a.label) {
|
|
1565
|
+
case 0: return [4 /*yield*/, throwIfNotConfigured()];
|
|
1566
|
+
case 1:
|
|
1567
|
+
_a.sent();
|
|
1568
|
+
RNPurchases.setSingularDeviceID(singularDeviceID);
|
|
1569
|
+
return [2 /*return*/];
|
|
1570
|
+
}
|
|
1571
|
+
});
|
|
1572
|
+
});
|
|
1573
|
+
};
|
|
1549
1574
|
/**
|
|
1550
1575
|
* Subscriber attribute associated with the OneSignal Player Id for the user
|
|
1551
1576
|
* Required for the RevenueCat OneSignal integration with OneSignal SDK v4.0 and below
|
package/ios/RNPurchases.m
CHANGED
|
@@ -441,6 +441,10 @@ RCT_EXPORT_METHOD(setKochavaDeviceID:(NSString *)kochavaDeviceID) {
|
|
|
441
441
|
[RCCommonFunctionality setKochavaDeviceID:kochavaDeviceID.mappingNSNullToNil];
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
+
RCT_EXPORT_METHOD(setSingularDeviceID:(NSString *)singularDeviceID) {
|
|
445
|
+
[RCCommonFunctionality setSingularDeviceID:singularDeviceID.mappingNSNullToNil];
|
|
446
|
+
}
|
|
447
|
+
|
|
444
448
|
RCT_EXPORT_METHOD(setOnesignalID:(NSString *)onesignalID) {
|
|
445
449
|
[RCCommonFunctionality setOnesignalID:onesignalID.mappingNSNullToNil];
|
|
446
450
|
}
|
|
@@ -785,7 +789,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
|
|
|
785
789
|
}
|
|
786
790
|
|
|
787
791
|
- (NSString *)platformFlavorVersion {
|
|
788
|
-
return @"10.
|
|
792
|
+
return @"10.9.0";
|
|
789
793
|
}
|
|
790
794
|
|
|
791
795
|
@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": "10.
|
|
4
|
+
"version": "10.9.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
|
"module": "dist/index.js",
|