expo-iap 2.9.7 → 3.0.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/CHANGELOG.md +36 -0
- package/README.md +10 -2
- 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 +48 -28
- package/plugin/build/withLocalOpenIAP.d.ts +6 -2
- package/plugin/build/withLocalOpenIAP.js +179 -20
- package/plugin/src/withIAP.ts +81 -37
- package/plugin/src/withLocalOpenIAP.ts +232 -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,41 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 3.0.1 - 2025-09-13
|
|
4
|
+
|
|
5
|
+
- Android: Ensure `openiap-google:1.1.0` is added inside `dependencies {}` and replace/dedupe existing entries. In local dev, remove the Maven line and rely on `project(':openiap-google')`. Library fallback bumped to 1.1.0.
|
|
6
|
+
- iOS: Honor `enableLocalDev: false` even when `localPath` is set. Ensure CocoaPods CDN in Podfile and remove any stale local `pod 'openiap', :path => ...` lines.
|
|
7
|
+
- Misc: Drop legacy Billing/GMS cleanup patterns, simplify prebuild logs, and add a short release blog post.
|
|
8
|
+
|
|
9
|
+
## 3.0.0 - 2025-09-13
|
|
10
|
+
|
|
11
|
+
Breaking changes:
|
|
12
|
+
|
|
13
|
+
- Remove legacy APIs: `getProducts`, `getSubscriptions`, `requestProducts`, `requestSubscription`, `getPurchaseHistory`/`getPurchaseHistories`, and non‑suffixed iOS aliases
|
|
14
|
+
- `showManageSubscriptionsIOS()` now returns `Promise<Purchase[]>` (was `boolean`)
|
|
15
|
+
- `getAvailablePurchases()` options now only accept iOS keys: `alsoPublishToEventListenerIOS`, `onlyIncludeActiveItemsIOS`
|
|
16
|
+
|
|
17
|
+
Features:
|
|
18
|
+
|
|
19
|
+
- Unify tokens via `purchaseToken` on `Purchase` (iOS JWS + Android token)
|
|
20
|
+
- Add `getReceiptDataIOS` alias for iOS receipt parity
|
|
21
|
+
|
|
22
|
+
Refactor:
|
|
23
|
+
|
|
24
|
+
- Remove deprecated comments/tests/mocks; simplify subscription dedup to `id`
|
|
25
|
+
- Clean up hook surface and examples to current API
|
|
26
|
+
|
|
27
|
+
Fixes:
|
|
28
|
+
|
|
29
|
+
- iOS parity and guards across native bridge and TS layer
|
|
30
|
+
|
|
31
|
+
Docs:
|
|
32
|
+
|
|
33
|
+
- Add v3 migration and update API pages to remove legacy helpers
|
|
34
|
+
|
|
35
|
+
Tests:
|
|
36
|
+
|
|
37
|
+
- Remove legacy specs; all root and example suites pass
|
|
38
|
+
|
|
3
39
|
## [2.9.7] - 2025-09-12
|
|
4
40
|
|
|
5
41
|
### 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
|
|
|
@@ -16,7 +16,15 @@
|
|
|
16
16
|
|
|
17
17
|
## Notice
|
|
18
18
|
|
|
19
|
-
The `expo-iap` module has been migrated from [react-native-iap](https://github.com/dooboolab/react-native-iap).
|
|
19
|
+
The `expo-iap` module has been migrated from [react-native-iap](https://github.com/dooboolab/react-native-iap). While we initially considered fully merging everything into `react-native-iap`, we ultimately decided to maintain the two libraries in parallel, each tailored to its own ecosystem.
|
|
20
|
+
|
|
21
|
+
- **`react-native-iap`** → a **Nitro Modules–based** implementation for React Native.
|
|
22
|
+
- **`expo-iap`** → an **Expo Module** with tighter integration and smoother compatibility in the Expo ecosystem.
|
|
23
|
+
|
|
24
|
+
Both libraries will continue to be maintained in parallel going forward.
|
|
25
|
+
|
|
26
|
+
📖 See the [Future Roadmap and Discussion](https://github.com/dooboolab-community/react-native-iap/discussions/2754) for more details.
|
|
27
|
+
👉 Stay updated via the [Current Project Status comment](https://github.com/dooboolab-community/react-native-iap/discussions/2754#discussioncomment-10510249).
|
|
20
28
|
|
|
21
29
|
## Installation
|
|
22
30
|
|
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.1.0"
|
|
62
|
+
}
|
|
58
63
|
}
|