Skip to content

Releases: iaptic/react-native-iaptic

v2.1.0

08 Jun 10:23
25d9c9b

Choose a tag to compare

Value-add features on top of the GPBL V9 migration

Leveraging Google Play Billing Library V8/V9 capabilities.

New: getStorefront()

const storefront = await IapticRN.getStorefront();
// Returns ISO 3166-1 alpha-2 country code, e.g. "US", "DE", "JP"

Returns the user's storefront country code. On Android, uses Google Play's BillingConfig API (GPBL 6.1+). On iOS, uses StoreKit 2's storefront API (iOS 16+).

New: changeSubscription() and IapticReplacementMode

import { IapticRN, IapticReplacementMode } from 'react-native-iaptic';

// Upgrade with immediate proration
await IapticRN.changeSubscription(
  newOffer,
  oldPurchaseToken,
  IapticReplacementMode.WITH_TIME_PRORATION,
);

// Downgrade with deferred change (new plan takes effect at next renewal)
await IapticRN.changeSubscription(
  basicOffer,
  oldPurchaseToken,
  IapticReplacementMode.DEFERRED,
);

Explicit API for subscription upgrades/downgrades on Android. Requires the old subscription's purchaseToken and a replacementMode to define how the billing transition is handled. Supports all 6 GPBL replacement modes including KEEP_EXISTING (V8.1+).

New: isSuspended and quantity on IapticVerifiedPurchase

  • isSuspendedtrue when a subscription has been paused or put on hold due to payment decline. A suspended subscription is not considered "owned" by IapticRN.isOwned() or IapticRN.checkEntitlement(). Note: full functionality requires fork v13.0.2+ to serialize isSuspended from native Android.
  • quantity — the number of items purchased (for multi-quantity purchases on iOS and Android). Note: full functionality requires fork v13.0.2+ to serialize quantity from native Android.

New: subscription.suspended event

A new event type emitted when a subscription transitions to a suspended state (paused by user or on hold due to payment decline).

IapticRN.addEventListener('subscription.suspended', (purchase) => {
  console.log(`Subscription ${purchase.productId} is suspended`);
});

Locale updates

Added ActiveSubscription_Status_Suspended locale key to all 7 supported languages (EN, ES, FR, DE, JA, ZH, PT).

⚠️ Fork gaps (require @iaptic/react-native-iap v13.0.2+)

Feature Fork status Wrapper status
Purchase.isSuspended native serialization Not serialized Type + owned() check ready
Purchase.getQuantity native serialization Not serialized (Android) Type ready
ReplacementModesAndroid enum values Wrong (CHARGE_FULL_PRICE=5, DEFERRED=6) Workaround: cast via as unknown as
KEEP_EXISTING mode (value 6) Not in native when statement Enum value added

Test infrastructure

Fixed npm test — switched from broken react-native jest preset to ts-jest with full mocking of react-native, @iaptic/react-native-iap, and UI components. 27 tests now pass cleanly.

v2.0.0

05 Jun 13:32
2c1964a

Choose a tag to compare

react-native-iaptic@2.0.0

Breaking peer-dependency bump: @iaptic/react-native-iap from ^12.16.6 to ^13.0.0.

Google Play Billing Library V9

@iaptic/react-native-iap@13.0.0 upgrades Google Play Billing Library from V7 to V9. This is a breaking change because GPBL V9 removes queryPurchaseHistoryAsync and changes several API signatures:

  • getPurchaseHistory removed — GPBL V9 dropped queryPurchaseHistoryAsync. Use getAvailablePurchases instead. The purchaseHistory state and getPurchaseHistory hook helper are also removed from useIAP.
  • enablePendingPurchases() now requires PendingPurchasesParams — explicitly enables one-time products and prepaid plans. Omitting enableOneTimeProducts() silently breaks pending purchase flows in cash-payment markets.
  • queryProductDetailsAsync callback changed — the second parameter is now QueryProductDetailsResult (wrapping productDetailsList + unfetchedProductIds) instead of a plain List<ProductDetails>. Unfetched product IDs are logged as warnings.
  • Play Store blocked detection — GPBL V9 reclassified "Play Store is blocked" errors from ERROR to BILLING_UNAVAILABLE. A new E_STORE_BLOCKED error code (IapticErrorCode.STORE_BLOCKED) is now emitted, mapping to PurchaseError.E_STORE_BLOCKED in the JS layer.
  • billing-ktxbilling — the Kotlin extensions artifact was merged into the main billing artifact in V8+.
  • enableAutoServiceReconnection() added to the BillingClient builder.

Locale Updates

All 9 locales (EN, EN_UK, EN_AU, ES, FR, DE, JA, ZH, PT) now include:

  • PurchaseError_E_STORE_BLOCKED
  • IapticError_6777033

Upgrade Note

Consumers who need GPBL V7 can stay on @iaptic/react-native-iap@12.x / react-native-iaptic@1.x.

v1.3.1

26 May 13:33
ca71191

Choose a tag to compare

v1.3.1 — docs: async-storage 3.1.0 guidance + README revamp

v1.3.0 — AsyncStorage optional, Kotlin fix for RN 0.83

13 May 12:40
88168c7

Choose a tag to compare

AsyncStorage now optional

@react-native-async-storage/async-storage is no longer a required peer dependency. It is optional — only needed if using IapticTokensManager for consumable token tracking.

  • If you use IapticTokensManager, install: npm install @react-native-async-storage/async-storage@~2.1.0
  • If you don't use tokens, you can remove AsyncStorage entirely.
  • Existing token data is preserved.

Kotlin fix for RN 0.83 / Expo SDK 55

Minimum @iaptic/react-native-iap bumped to ^12.16.6, which contains a fix for the Unresolved reference currentActivity Kotlin compile error on React Native 0.83+.

Bug fix: unhandled promise rejection

Fixed IapticTokensManager constructor calling loadTransactions() without await or .catch().

Documentation

Updated INTEGRATION_GUIDE.md, README.md, and RELEASE_NOTES.md.

1.2.1 — fix repository and bugs URLs in package.json

04 May 14:35
785ae74

Choose a tag to compare

Metadata-only fix:

No code or behaviour changes vs. 1.2.0.

1.2.0 — switch IAP layer to @iaptic/react-native-iap fork

04 May 14:16
f31adf0

Choose a tag to compare

Breaking change — IAP layer now uses @iaptic/react-native-iap

react-native-iaptic no longer consumes upstream react-native-iap (which was archived on 2026-04-26 and replaced by an OpenIAP/Nitro Modules rewrite at v15+). The SDK now peer-depends on @iaptic/react-native-iap@^12.16.5 — an Iaptic-maintained fork of 12.16.4 with the iOS new-architecture pod fix built in.

Why: the v12.x line will not receive any further upstream patches, so the RN ≥ 0.83 / Expo SDK ≥ 55 build error (Unable to find a specification for RCT-Folly) had no future fix path. Maintaining a frozen v12.x fork was lower-cost than asking every user to maintain a patch-package patch.

Migration from 1.1.0:

# Remove upstream package and any patch-package workaround
npm uninstall react-native-iap
rm -f patches/react-native-iap+*.patch

# Install the fork
npm install @iaptic/react-native-iap @react-native-async-storage/async-storage

If you reference the Expo config plugin in app.json / app.config.js, change "react-native-iap" to "@iaptic/react-native-iap".

The JavaScript API surface, Java/Obj-C/Swift native code, and the withIAP Expo plugin behaviour are unchanged from upstream 12.16.4.

Verified against

  • Expo SDK 55.0.19 / React Native 0.83.6 / new architecture / iOS prebuilt artifacts.
  • npm install @iaptic/react-native-iapexpo prebuildpod install → full iOS Debug xcodebuild (BUILD SUCCEEDED), with no patch-package involved.

Future direction

react-native-iaptic@2.x is planned to migrate to the OpenIAP/Nitro Modules-based v15+ react-native-iap (the long-term successor). The fork is a stop-gap for the v12.x line and will be sunset when 2.x ships.

1.1.0 — peer dependencies + RN 0.83 troubleshooting

04 May 14:15
124dea6

Choose a tag to compare

Breaking change — peer dependencies

react-native-iap and @react-native-async-storage/async-storage moved from dependencies to peerDependencies. You must now install them explicitly:

npm install 'react-native-iap@^12.16.1' @react-native-async-storage/async-storage
npm install react-native-iaptic

Why:

  • The react-native-iap Expo config plugin (withIAP, referenced as "react-native-iap" in app.json / app.config.js) only resolves when the package is hoisted to your project root. With the previous nested install, Expo prebuild could not load it.
  • You can now pin or patch-package react-native-iap independently — required to apply the iOS build fix for React Native ≥ 0.83 (see Troubleshooting below).

Pin react-native-iap to the 12.x line. v13.x has the same JS API but ships the same broken iOS podspec; v14.x is a Nitro Modules rewrite and is not API-compatible.

Peer ranges:

  • react-native-iap: >=12.16.1 <14
  • @react-native-async-storage/async-storage: >=1.19.0 <4
  • react: >=17
  • react-native: >=0.64

Documentation

  • README and INTEGRATION_GUIDE.md now cover the Expo config plugin setup.
  • New troubleshooting entry for the React Native ≥ 0.83 / Expo SDK ≥ 55 / new architecture iOS build error (Unable to find a specification for RCT-Folly depended upon by RNIap), with a validated patch-package diff.

Verified against

  • Expo SDK 55.0.19 / React Native 0.83.6 / new architecture / iOS prebuilt artifacts.
  • Full iOS Debug compile + link succeeds with the documented patch-package workaround applied.