expo-iap 2.9.2 → 2.9.3

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/CHANGELOG.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
- ## [2.9.2] - 2025-09-10
3
+ ## [2.9.3] - 2025-09-10
4
4
 
5
- ### Changed
5
+ ### Fixed
6
6
 
7
- - iOS: bump OpenIAP Apple dependency to `1.1.8` in podspec for stability fixes
8
- - Docs: add 2.9.2 release notes
7
+ - iOS: replace thrown `OpenIapError.*` and nonexistent types with `OpenIapFailure` cases to resolve build errors and align with error mapping
8
+ - iOS: remove explicit `OpenIapErrorEvent` annotation in Swift listener (type is inferred from OpenIAP API)
9
9
 
10
10
  ### Notes
11
11
 
12
- - If CocoaPods trunk lags, temporarily pin `openiap` to `1.1.8` via git in your app Podfile.
12
+ - If your CocoaPods CDN is flaky, `pod install --repo-update` or temporarily pin `openiap` in your app Podfile.
13
13
 
14
14
  ## [2.9.1] - 2025-09-09
15
15
 
@@ -107,7 +107,7 @@ public class ExpoIapModule: Module {
107
107
  // Validate SKUs
108
108
  guard !skus.isEmpty else {
109
109
  logDebug("ERROR: Empty SKUs array!")
110
- throw OpenIapError.purchaseFailed(reason: "Empty SKU list provided")
110
+ throw OpenIapFailure.purchaseFailed(reason: "Empty SKU list provided")
111
111
  }
112
112
 
113
113
  // Convert string to OpenIapRequestProductType enum
@@ -146,7 +146,7 @@ public class ExpoIapModule: Module {
146
146
  AsyncFunction("requestPurchase") { (params: [String: Any]) async throws in
147
147
  // Extract and validate required fields
148
148
  guard let sku = params["sku"] as? String, !sku.isEmpty else {
149
- throw OpenIapError.purchaseFailed(reason: "Missing required 'sku'")
149
+ throw OpenIapFailure.purchaseFailed(reason: "Missing required 'sku'")
150
150
  }
151
151
 
152
152
  // Optional fields
@@ -197,7 +197,7 @@ public class ExpoIapModule: Module {
197
197
  logDebug("Purchase request completed successfully")
198
198
  } catch {
199
199
  logDebug("Purchase request failed with error: \(error)")
200
- throw OpenIapError.storeKitError(error: error)
200
+ throw OpenIapFailure.storeKitError(error: error)
201
201
  }
202
202
  }
203
203
 
@@ -276,7 +276,7 @@ public class ExpoIapModule: Module {
276
276
  "latestTransaction": result.latestTransaction.map { OpenIapSerialization.purchase($0) },
277
277
  ]
278
278
  } catch {
279
- throw OpenIapError.invalidReceipt
279
+ throw OpenIapFailure.invalidReceipt
280
280
  }
281
281
  }
282
282
 
@@ -402,7 +402,7 @@ public class ExpoIapModule: Module {
402
402
  }
403
403
  return nil
404
404
  } catch {
405
- throw OpenIapError.productNotFound(id: sku)
405
+ throw OpenIapFailure.productNotFound(id: sku)
406
406
  }
407
407
  }
408
408
 
@@ -414,7 +414,7 @@ public class ExpoIapModule: Module {
414
414
  }
415
415
  return nil
416
416
  } catch {
417
- throw OpenIapError.productNotFound(id: sku)
417
+ throw OpenIapFailure.productNotFound(id: sku)
418
418
  }
419
419
  }
420
420
  }
@@ -434,7 +434,7 @@ public class ExpoIapModule: Module {
434
434
  }
435
435
  }
436
436
 
437
- purchaseErrorSub = OpenIapModule.shared.purchaseErrorListener { [weak self] (event: OpenIapErrorEvent) in
437
+ purchaseErrorSub = OpenIapModule.shared.purchaseErrorListener { [weak self] event in
438
438
  Task { @MainActor in
439
439
  guard let self else { return }
440
440
  logDebug("❌ Purchase error callback - sending error event")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-iap",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "description": "In App Purchase module in Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",