react-native-iap 12.3.3 → 12.3.4
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/ios/IapSerializationUtils.swift +0 -11
- package/ios/RNIapIosSk2.swift +13 -0
- package/package.json +1 -1
|
@@ -196,14 +196,3 @@ func serialize(_ pt: Product.ProductType?) -> String? {
|
|
|
196
196
|
return nil
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
@available(iOS 15.0, tvOS 15.0, *)
|
|
201
|
-
func serialize(_ rs: Transaction.RefundRequestStatus?) -> String? {
|
|
202
|
-
guard let rs = rs else {return nil}
|
|
203
|
-
switch rs {
|
|
204
|
-
case .success: return "success"
|
|
205
|
-
case .userCancelled: return "userCancelled"
|
|
206
|
-
default:
|
|
207
|
-
return nil
|
|
208
|
-
}
|
|
209
|
-
}
|
package/ios/RNIapIosSk2.swift
CHANGED
|
@@ -911,6 +911,16 @@ class RNIapIosSk2iOS15: Sk2Delegate {
|
|
|
911
911
|
|
|
912
912
|
// TODO: Duplicated code to get the latest transaction, can be cleaned up.
|
|
913
913
|
func beginRefundRequest(_ sku: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
914
|
+
#if !os(tvOS)
|
|
915
|
+
@Sendable func serialize(_ rs: Transaction.RefundRequestStatus?) -> String? {
|
|
916
|
+
guard let rs = rs else {return nil}
|
|
917
|
+
switch rs {
|
|
918
|
+
case .success: return "success"
|
|
919
|
+
case .userCancelled: return "userCancelled"
|
|
920
|
+
default:
|
|
921
|
+
return nil
|
|
922
|
+
}
|
|
923
|
+
}
|
|
914
924
|
Task {
|
|
915
925
|
if let windowScene = await UIApplication.shared.keyWindow?.windowScene {
|
|
916
926
|
if let product = products[sku] {
|
|
@@ -936,5 +946,8 @@ class RNIapIosSk2iOS15: Sk2Delegate {
|
|
|
936
946
|
reject(IapErrors.E_DEVELOPER_ERROR.rawValue, "Cannon find window Scene", nil)
|
|
937
947
|
}
|
|
938
948
|
}
|
|
949
|
+
#else
|
|
950
|
+
reject(IapErrors.E_USER_CANCELLED.rawValue, "This method is not available on tvOS", nil)
|
|
951
|
+
#endif
|
|
939
952
|
}
|
|
940
953
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-iap",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.4",
|
|
4
4
|
"description": "React Native In App Purchase Module.",
|
|
5
5
|
"repository": "https://github.com/dooboolab/react-native-iap",
|
|
6
6
|
"author": "dooboolab <support@dooboolab.com> (https://github.com/dooboolab)",
|