expo-iap 2.7.2 → 2.7.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,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.7.3] - 2025-07-23
4
+
5
+ ### Fixed
6
+
7
+ - Upgraded Android Google Play Billing Library to v8.0.0
8
+ - Fixed Kotlin version compatibility issues with expo-modules-core
9
+
10
+ ### Changed
11
+
12
+ - Android now requires Kotlin 2.0+ for Google Play Billing Library v8.0.0 support
13
+ - Added requirement for `expo-build-properties` configuration to override Kotlin version
14
+
15
+ ### Documentation
16
+
17
+ - Added Android configuration section in README explaining the need for expo-build-properties
18
+ - Documented Kotlin version requirement for Android builds
19
+
20
+ ## [2.7.2] - 2025-07-22
21
+
22
+ ### Added
23
+
24
+ - iOS 16.0+ app transaction support with SDK version check (#113)
25
+
3
26
  ## [2.7.1] - 2025-07-22
4
27
 
5
28
  ### Fixed
package/README.md CHANGED
@@ -29,6 +29,27 @@ The `expo-iap` module has been migrated from [react-native-iap](https://github.c
29
29
  npx expo install expo-iap
30
30
  ```
31
31
 
32
+ ### Android Configuration
33
+
34
+ **Important:** For Android, `expo-iap` uses Google Play Billing Library v8.0.0 which requires Kotlin 2.0+. Since `expo-modules-core` doesn't support Kotlin v2 yet, you need to configure your project with `expo-build-properties`:
35
+
36
+ ```json
37
+ {
38
+ "expo": {
39
+ "plugins": [
40
+ [
41
+ "expo-build-properties",
42
+ {
43
+ "android": {
44
+ "kotlinVersion": "2.0.21"
45
+ }
46
+ }
47
+ ]
48
+ ]
49
+ }
50
+ }
51
+ ```
52
+
32
53
  ## Contributing
33
54
 
34
55
  We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details on:
@@ -12,13 +12,14 @@ import com.android.billingclient.api.BillingConfigResponseListener
12
12
  import com.android.billingclient.api.BillingResult
13
13
  import com.android.billingclient.api.ConsumeParams
14
14
  import com.android.billingclient.api.GetBillingConfigParams
15
+ import com.android.billingclient.api.PendingPurchasesParams
15
16
  import com.android.billingclient.api.ProductDetails
16
- import com.android.billingclient.api.QueryProductDetailsResult
17
+ import com.android.billingclient.api.ProductDetailsResult
17
18
  import com.android.billingclient.api.Purchase
18
19
  import com.android.billingclient.api.PurchasesUpdatedListener
19
20
  import com.android.billingclient.api.QueryProductDetailsParams
21
+ import com.android.billingclient.api.QueryProductDetailsResult
20
22
  import com.android.billingclient.api.QueryPurchasesParams
21
- import com.android.billingclient.api.PendingPurchasesParams
22
23
  import com.google.android.gms.common.ConnectionResult
23
24
  import com.google.android.gms.common.GoogleApiAvailability
24
25
  import expo.modules.kotlin.Promise
@@ -556,12 +557,7 @@ class ExpoIapModule :
556
557
  BillingClient
557
558
  .newBuilder(context)
558
559
  .setListener(this)
559
- .enablePendingPurchases(
560
- PendingPurchasesParams.newBuilder()
561
- .enableOneTimeProducts()
562
- .build()
563
- )
564
- .enableAutoServiceReconnection()
560
+ .enablePendingPurchases(PendingPurchasesParams.newBuilder().enableOneTimeProducts().build())
565
561
  .build()
566
562
 
567
563
  billingClientCache?.startConnection(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-iap",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "In App Purchase module in Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -19,7 +19,7 @@ const addLineToGradle = (content, anchor, lineToAdd, offset = 1) => {
19
19
  const modifyAppBuildGradle = (gradle) => {
20
20
  let modified = gradle;
21
21
  // Add billing library dependencies to app-level build.gradle
22
- const billingDep = ` implementation "com.android.billingclient:billing-ktx:7.0.0"`;
22
+ const billingDep = ` implementation "com.android.billingclient:billing-ktx:8.0.0"`;
23
23
  const gmsDep = ` implementation "com.google.android.gms:play-services-base:18.1.0"`;
24
24
  let hasAddedDependency = false;
25
25
  if (!modified.includes(billingDep)) {
@@ -34,7 +34,7 @@ const modifyAppBuildGradle = (gradle: string): string => {
34
34
  let modified = gradle;
35
35
 
36
36
  // Add billing library dependencies to app-level build.gradle
37
- const billingDep = ` implementation "com.android.billingclient:billing-ktx:7.0.0"`;
37
+ const billingDep = ` implementation "com.android.billingclient:billing-ktx:8.0.0"`;
38
38
  const gmsDep = ` implementation "com.google.android.gms:play-services-base:18.1.0"`;
39
39
 
40
40
  let hasAddedDependency = false;