Skip to main content

v2.7.3 Release - Google Play Billing Library v8.0.0 Support

ยท 2 min read
Hyo
Expo IAP Maintainer

We're excited to announce the release of expo-iap v2.7.3, which brings full support for Google Play Billing Library v8.0.0! This update ensures compatibility with the latest Android billing features and improved error handling.

๐Ÿš€ What's Newโ€‹

Google Play Billing Library v8.0.0 Supportโ€‹

  • Upgraded billing library from v7.0.0 to v8.0.0
  • Enhanced error handling with sub-response codes for better debugging
  • Improved API compatibility with updated callback signatures

Key Changesโ€‹

  • Updated queryProductDetailsAsync callback to use QueryProductDetailsResult
  • Enhanced enablePendingPurchases with proper parameter configuration
  • Removed deprecated hardcoded Kotlin version constraints

โš ๏ธ Breaking Changesโ€‹

Android Kotlin Version Requirementโ€‹

Important: Google Play Billing Library v8.0.0 requires Kotlin 2.0+, but expo-modules-core doesn't support Kotlin v2 yet. You need to configure your project with expo-build-properties:

{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"android": {
"kotlinVersion": "2.0.21"
}
}
]
]
}
}

๐Ÿ“ฆ Installationโ€‹

If you're upgrading to v2.7.3:

npx expo install expo-iap@2.7.3

Don't forget to add the expo-build-properties configuration to your app.json if you haven't already!

๐Ÿ”ง Migration Guideโ€‹

For Existing Projectsโ€‹

  1. Update to expo-iap v2.7.3
  2. Add expo-build-properties plugin configuration to your app.json
  3. Run npx expo prebuild --clean to regenerate native code
  4. Test your purchase flows to ensure everything works correctly

Why This Change?โ€‹

Google Play Billing Library v8.0.0 introduces several improvements:

  • Better error handling with detailed sub-response codes
  • Enhanced product fetching with unfetched product tracking
  • Improved security and performance

However, it requires Kotlin 2.0+, which conflicts with expo-modules-core's current Kotlin version requirements. The expo-build-properties solution provides a clean workaround until expo-modules-core supports Kotlin v2.

๐Ÿ“š Documentation Updatesโ€‹

We've updated our documentation to include:

  • Android configuration section with step-by-step setup
  • Kotlin version requirement explanation
  • expo-build-properties configuration guide

Visit our installation guide for complete setup instructions.

๐Ÿ™ Acknowledgmentsโ€‹

Thanks to the community for reporting the billing library compatibility issues and helping us test the Kotlin version solutions. Your feedback makes expo-iap better for everyone!


As always, if you encounter any issues or have feedback, please open an issue on GitHub.

Happy coding! ๐ŸŽ‰