expo-iap 2.9.7 → 3.0.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/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/android/build.gradle +7 -2
- package/android/src/main/java/expo/modules/iap/ExpoIapModule.kt +195 -650
- package/android/src/main/java/expo/modules/iap/PromiseUtils.kt +85 -0
- package/build/ExpoIap.types.d.ts +0 -6
- package/build/ExpoIap.types.d.ts.map +1 -1
- package/build/ExpoIap.types.js.map +1 -1
- package/build/helpers/subscription.d.ts.map +1 -1
- package/build/helpers/subscription.js +14 -3
- package/build/helpers/subscription.js.map +1 -1
- package/build/index.d.ts +6 -73
- package/build/index.d.ts.map +1 -1
- package/build/index.js +21 -154
- package/build/index.js.map +1 -1
- package/build/modules/android.d.ts +2 -2
- package/build/modules/android.d.ts.map +1 -1
- package/build/modules/android.js +11 -1
- package/build/modules/android.js.map +1 -1
- package/build/modules/ios.d.ts +0 -60
- package/build/modules/ios.d.ts.map +1 -1
- package/build/modules/ios.js +2 -121
- package/build/modules/ios.js.map +1 -1
- package/build/types/ExpoIapAndroid.types.d.ts +0 -8
- package/build/types/ExpoIapAndroid.types.d.ts.map +1 -1
- package/build/types/ExpoIapAndroid.types.js +0 -1
- package/build/types/ExpoIapAndroid.types.js.map +1 -1
- package/build/types/ExpoIapIOS.types.d.ts +0 -5
- package/build/types/ExpoIapIOS.types.d.ts.map +1 -1
- package/build/types/ExpoIapIOS.types.js.map +1 -1
- package/build/useIAP.d.ts +0 -18
- package/build/useIAP.d.ts.map +1 -1
- package/build/useIAP.js +1 -18
- package/build/useIAP.js.map +1 -1
- package/bun.lock +340 -137
- package/codecov.yml +17 -21
- package/ios/ExpoIapModule.swift +10 -3
- package/jest.config.js +5 -9
- package/package.json +5 -3
- package/plugin/build/withIAP.d.ts +4 -1
- package/plugin/build/withIAP.js +38 -24
- package/plugin/build/withLocalOpenIAP.d.ts +6 -2
- package/plugin/build/withLocalOpenIAP.js +175 -20
- package/plugin/src/withIAP.ts +66 -30
- package/plugin/src/withLocalOpenIAP.ts +228 -24
- package/src/ExpoIap.types.ts +0 -8
- package/src/helpers/subscription.ts +14 -3
- package/src/index.ts +22 -230
- package/src/modules/android.ts +16 -6
- package/src/modules/ios.ts +2 -168
- package/src/types/ExpoIapAndroid.types.ts +0 -11
- package/src/types/ExpoIapIOS.types.ts +0 -5
- package/src/useIAP.ts +3 -55
- package/android/src/main/java/expo/modules/iap/PlayUtils.kt +0 -178
- package/android/src/main/java/expo/modules/iap/Types.kt +0 -98
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 3.0.0 - 2025-09-13
|
|
4
|
+
|
|
5
|
+
Breaking changes:
|
|
6
|
+
|
|
7
|
+
- Remove legacy APIs: `getProducts`, `getSubscriptions`, `requestProducts`, `requestSubscription`, `getPurchaseHistory`/`getPurchaseHistories`, and non‑suffixed iOS aliases
|
|
8
|
+
- `showManageSubscriptionsIOS()` now returns `Promise<Purchase[]>` (was `boolean`)
|
|
9
|
+
- `getAvailablePurchases()` options now only accept iOS keys: `alsoPublishToEventListenerIOS`, `onlyIncludeActiveItemsIOS`
|
|
10
|
+
|
|
11
|
+
Features:
|
|
12
|
+
|
|
13
|
+
- Unify tokens via `purchaseToken` on `Purchase` (iOS JWS + Android token)
|
|
14
|
+
- Add `getReceiptDataIOS` alias for iOS receipt parity
|
|
15
|
+
|
|
16
|
+
Refactor:
|
|
17
|
+
|
|
18
|
+
- Remove deprecated comments/tests/mocks; simplify subscription dedup to `id`
|
|
19
|
+
- Clean up hook surface and examples to current API
|
|
20
|
+
|
|
21
|
+
Fixes:
|
|
22
|
+
|
|
23
|
+
- iOS parity and guards across native bridge and TS layer
|
|
24
|
+
|
|
25
|
+
Docs:
|
|
26
|
+
|
|
27
|
+
- Add v3 migration and update API pages to remove legacy helpers
|
|
28
|
+
|
|
29
|
+
Tests:
|
|
30
|
+
|
|
31
|
+
- Remove legacy specs; all root and example suites pass
|
|
32
|
+
|
|
3
33
|
## [2.9.7] - 2025-09-12
|
|
4
34
|
|
|
5
35
|
### Changed
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<img src="https://hyochan.github.io/expo-iap/img/icon.png" alt="Expo IAP Logo" width="150" />
|
|
5
5
|
|
|
6
|
-
[](https://npmjs.org/package/expo-iap) [](https://npmjs.org/package/expo-iap) [](https://app.fossa.com/projects/git%2Bgithub.com%2Fhyochan%2Fexpo-iap?ref=badge_shield&issueType=license)
|
|
6
|
+
[](https://npmjs.org/package/expo-iap) [](https://npmjs.org/package/expo-iap) [](https://github.com/hyochan/expo-iap/actions/workflows/ci.yml) [](https://codecov.io/gh/hyochan/expo-iap) [](https://app.fossa.com/projects/git%2Bgithub.com%2Fhyochan%2Fexpo-iap?ref=badge_shield&issueType=license)
|
|
7
7
|
|
|
8
8
|
In app purchase module in [Expo](https://docs.expo.dev/guides/in-app-purchases) that conforms to the [Open IAP specification](https://openiap.dev)
|
|
9
9
|
|
package/android/build.gradle
CHANGED
|
@@ -53,6 +53,11 @@ android {
|
|
|
53
53
|
|
|
54
54
|
dependencies {
|
|
55
55
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7"
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// Use OpenIAP Google module only; avoid direct BillingClient dependency
|
|
57
|
+
if (findProject(":openiap-google") != null) {
|
|
58
|
+
implementation project(":openiap-google")
|
|
59
|
+
} else {
|
|
60
|
+
// Fallback to published artifact when local project isn't linked
|
|
61
|
+
implementation "io.github.hyochan.openiap:openiap-google:1.0.1"
|
|
62
|
+
}
|
|
58
63
|
}
|