react-native-iap 14.4.35-rc.1 → 14.4.36-rc.1

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 CHANGED
@@ -15,6 +15,21 @@
15
15
  <a href="https://openiap.dev"><img src="https://github.com/hyodotdev/openiap/blob/main/logo.png" alt="Open IAP" height="40" /></a>
16
16
  </div>
17
17
 
18
+ ## 🎨 Promotion
19
+
20
+ <div align="center">
21
+ <a href="https://hyodotdev.github.io/kstyled">
22
+ <img src="https://hyodotdev.github.io/kstyled/img/logo.png" alt="kstyled Logo" width="120" />
23
+ </a>
24
+
25
+ **Compile-time CSS-in-JS for React Native**
26
+
27
+ ✨ Banishing runtime overhead, one style at a time with **[kstyled](https://hyodotdev.github.io/kstyled)** - fully type-safe styling that compiles away.
28
+
29
+ 🚀 **[Explore kstyled →](https://hyodotdev.github.io/kstyled)**
30
+
31
+ </div>
32
+
18
33
  ## 📚 Documentation
19
34
 
20
35
  **[📖 Visit our comprehensive documentation site →](https://hyochan.github.io/react-native-iap)**
@@ -461,33 +461,12 @@ class HybridRnIap : HybridRnIapSpec() {
461
461
  }
462
462
 
463
463
  val result: List<OpenIapPurchase> = if (normalizedType != null) {
464
+ val typeEnum = parseProductQueryType(normalizedType)
464
465
  RnIapLog.payload(
465
466
  "getAvailablePurchases.native",
466
- mapOf("type" to normalizedType)
467
+ mapOf("type" to typeEnum.rawValue)
467
468
  )
468
- // OpenIAP's getAvailablePurchases doesn't support type filtering
469
- // Get all purchases and filter manually
470
- val allPurchases = openIap.getAvailablePurchases(null)
471
-
472
- // Partition purchases to handle cases where product type is not yet cached
473
- val (knownTypePurchases, unknownTypePurchases) = allPurchases.partition {
474
- productTypeBySku.containsKey(it.productId)
475
- }
476
-
477
- if (unknownTypePurchases.isNotEmpty()) {
478
- RnIapLog.warn(
479
- "getAvailablePurchases: Could not determine type for product IDs: " +
480
- "${unknownTypePurchases.map { it.productId }.joinToString()}. " +
481
- "These will be excluded from '$normalizedType' filtered lists. " +
482
- "Call fetchProducts first to populate product type cache."
483
- )
484
- }
485
-
486
- when (normalizedType) {
487
- "in-app" -> knownTypePurchases.filter { productTypeBySku[it.productId] == "in-app" }
488
- "subs" -> knownTypePurchases.filter { productTypeBySku[it.productId] == "subs" }
489
- else -> allPurchases
490
- }
469
+ openIap.getAvailableItems(typeEnum)
491
470
  } else {
492
471
  RnIapLog.payload("getAvailablePurchases.native", mapOf("type" to "all"))
493
472
  openIap.getAvailablePurchases(null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-iap",
3
- "version": "14.4.35-rc.1",
3
+ "version": "14.4.36-rc.1",
4
4
  "description": "React Native In-App Purchases module for iOS and Android using Nitro",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",