react-native-purchases 7.25.0 → 7.26.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
CHANGED
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
|
|
|
10
10
|
spec.authors = package['author']
|
|
11
11
|
spec.homepage = "https://github.com/RevenueCat/react-native-purchases"
|
|
12
12
|
spec.license = package['license']
|
|
13
|
-
spec.
|
|
13
|
+
spec.platforms = {:ios => "11.0", :tvos => "11.0"}
|
|
14
14
|
|
|
15
15
|
spec.source = { :git => "https://github.com/RevenueCat/react-native-purchases.git" }
|
|
16
16
|
spec.source_files = "ios/**/*.{h,m,swift}"
|
package/android/build.gradle
CHANGED
|
@@ -46,7 +46,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
46
46
|
private static final String CUSTOMER_INFO_UPDATED = "Purchases-CustomerInfoUpdated";
|
|
47
47
|
private static final String LOG_HANDLER_EVENT = "Purchases-LogHandlerEvent";
|
|
48
48
|
public static final String PLATFORM_NAME = "react-native";
|
|
49
|
-
public static final String PLUGIN_VERSION = "7.
|
|
49
|
+
public static final String PLUGIN_VERSION = "7.26.0";
|
|
50
50
|
|
|
51
51
|
private final ReactApplicationContext reactContext;
|
|
52
52
|
|
package/ios/RNPurchases.m
CHANGED
|
@@ -52,8 +52,8 @@ RCT_EXPORT_METHOD(setupPurchases:(NSString *)apiKey
|
|
|
52
52
|
platformFlavor:self.platformFlavor
|
|
53
53
|
platformFlavorVersion:self.platformFlavorVersion
|
|
54
54
|
usesStoreKit2IfAvailable:usesStoreKit2IfAvailable
|
|
55
|
-
dangerousSettings:nil
|
|
56
|
-
shouldShowInAppMessagesAutomatically:shouldShowInAppMessagesAutomatically
|
|
55
|
+
dangerousSettings:nil
|
|
56
|
+
shouldShowInAppMessagesAutomatically:shouldShowInAppMessagesAutomatically
|
|
57
57
|
verificationMode:entitlementVerificationMode];
|
|
58
58
|
purchases.delegate = self;
|
|
59
59
|
}
|
|
@@ -190,11 +190,15 @@ RCT_EXPORT_METHOD(setAutomaticAppleSearchAdsAttributionCollection:(BOOL)automati
|
|
|
190
190
|
|
|
191
191
|
RCT_EXPORT_METHOD(enableAdServicesAttributionTokenCollection)
|
|
192
192
|
{
|
|
193
|
+
#if !TARGET_OS_TV
|
|
193
194
|
if (@available(iOS 14.3, macOS 11.1, macCatalyst 14.3, *)) {
|
|
194
195
|
[RCCommonFunctionality enableAdServicesAttributionTokenCollection];
|
|
195
196
|
} else {
|
|
196
197
|
NSLog(@"[Purchases] Warning: tried to enable AdServices attribution token collection, but it's only available on iOS 14.3 or greater or macOS 11.1 or greater.");
|
|
197
198
|
}
|
|
199
|
+
#else
|
|
200
|
+
NSLog(@"[Purchases] Warning: AdServices attribution token collection is not available on tvOS.");
|
|
201
|
+
#endif
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
RCT_REMAP_METHOD(isAnonymous,
|
|
@@ -235,14 +239,14 @@ RCT_REMAP_METHOD(getPromotionalOffer,
|
|
|
235
239
|
}
|
|
236
240
|
|
|
237
241
|
RCT_EXPORT_METHOD(presentCodeRedemptionSheet) {
|
|
238
|
-
#if TARGET_OS_MACCATALYST
|
|
239
|
-
logUnavailablePresentCodeRedemptionSheet();
|
|
240
|
-
#else
|
|
242
|
+
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
|
|
241
243
|
if (@available(iOS 14.0, *)) {
|
|
242
244
|
[RCCommonFunctionality presentCodeRedemptionSheet];
|
|
243
245
|
} else {
|
|
244
246
|
logUnavailablePresentCodeRedemptionSheet();
|
|
245
247
|
}
|
|
248
|
+
#else
|
|
249
|
+
logUnavailablePresentCodeRedemptionSheet();
|
|
246
250
|
#endif
|
|
247
251
|
}
|
|
248
252
|
|
|
@@ -353,7 +357,7 @@ RCT_REMAP_METHOD(canMakePayments,
|
|
|
353
357
|
|
|
354
358
|
RCT_EXPORT_METHOD(beginRefundRequestForActiveEntitlement:(RCTPromiseResolveBlock)resolve
|
|
355
359
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
356
|
-
#if TARGET_OS_IPHONE
|
|
360
|
+
#if TARGET_OS_IPHONE && !TARGET_OS_TV
|
|
357
361
|
if (@available(iOS 15.0, *)) {
|
|
358
362
|
[RCCommonFunctionality beginRefundRequestForActiveEntitlementCompletion:[self getBeginRefundResponseCompletionBlockWithResolve:resolve
|
|
359
363
|
reject:reject]];
|
|
@@ -368,7 +372,7 @@ RCT_EXPORT_METHOD(beginRefundRequestForActiveEntitlement:(RCTPromiseResolveBlock
|
|
|
368
372
|
RCT_EXPORT_METHOD(beginRefundRequestForEntitlementId:(NSString *)entitlementIdentifier
|
|
369
373
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
370
374
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
371
|
-
#if TARGET_OS_IPHONE
|
|
375
|
+
#if TARGET_OS_IPHONE && !TARGET_OS_TV
|
|
372
376
|
if (@available(iOS 15.0, *)) {
|
|
373
377
|
[RCCommonFunctionality beginRefundRequestEntitlementId:entitlementIdentifier
|
|
374
378
|
completionBlock:[self getBeginRefundResponseCompletionBlockWithResolve:resolve
|
|
@@ -384,7 +388,7 @@ RCT_EXPORT_METHOD(beginRefundRequestForEntitlementId:(NSString *)entitlementIden
|
|
|
384
388
|
RCT_EXPORT_METHOD(beginRefundRequestForProductId:(NSString *)productIdentifier
|
|
385
389
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
386
390
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
387
|
-
#if TARGET_OS_IPHONE
|
|
391
|
+
#if TARGET_OS_IPHONE && !TARGET_OS_TV
|
|
388
392
|
if (@available(iOS 15.0, *)) {
|
|
389
393
|
[RCCommonFunctionality beginRefundRequestProductId:productIdentifier
|
|
390
394
|
completionBlock:[self getBeginRefundResponseCompletionBlockWithResolve:resolve
|
|
@@ -400,7 +404,7 @@ RCT_EXPORT_METHOD(beginRefundRequestForProductId:(NSString *)productIdentifier
|
|
|
400
404
|
RCT_EXPORT_METHOD(showInAppMessages:(NSArray<NSNumber *> *)messageTypes
|
|
401
405
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
402
406
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
403
|
-
#if TARGET_OS_IPHONE
|
|
407
|
+
#if TARGET_OS_IPHONE && !TARGET_OS_TV
|
|
404
408
|
if (@available(iOS 16.0, *)) {
|
|
405
409
|
if (messageTypes == nil) {
|
|
406
410
|
[RCCommonFunctionality showStoreMessagesCompletion:^{
|
|
@@ -490,7 +494,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
|
|
|
490
494
|
}
|
|
491
495
|
|
|
492
496
|
- (NSString *)platformFlavorVersion {
|
|
493
|
-
return @"7.
|
|
497
|
+
return @"7.26.0";
|
|
494
498
|
}
|
|
495
499
|
|
|
496
500
|
@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": "7.
|
|
4
|
+
"version": "7.26.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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"readmeFilename": "README.md",
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": ">= 16.6.3",
|
|
67
|
-
"react-native": "
|
|
67
|
+
"react-native": "*"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/jest": "^29.5.12",
|