Releases: iaptic/react-native-iaptic
v2.1.0
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
isSuspended—truewhen a subscription has been paused or put on hold due to payment decline. A suspended subscription is not considered "owned" byIapticRN.isOwned()orIapticRN.checkEntitlement(). Note: full functionality requires fork v13.0.2+ to serializeisSuspendedfrom 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 serializequantityfrom 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
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:
getPurchaseHistoryremoved — GPBL V9 droppedqueryPurchaseHistoryAsync. UsegetAvailablePurchasesinstead. ThepurchaseHistorystate andgetPurchaseHistoryhook helper are also removed fromuseIAP.enablePendingPurchases()now requiresPendingPurchasesParams— explicitly enables one-time products and prepaid plans. OmittingenableOneTimeProducts()silently breaks pending purchase flows in cash-payment markets.queryProductDetailsAsynccallback changed — the second parameter is nowQueryProductDetailsResult(wrappingproductDetailsList+unfetchedProductIds) instead of a plainList<ProductDetails>. Unfetched product IDs are logged as warnings.- Play Store blocked detection — GPBL V9 reclassified "Play Store is blocked" errors from
ERRORtoBILLING_UNAVAILABLE. A newE_STORE_BLOCKEDerror code (IapticErrorCode.STORE_BLOCKED) is now emitted, mapping toPurchaseError.E_STORE_BLOCKEDin the JS layer. billing-ktx→billing— the Kotlin extensions artifact was merged into the mainbillingartifact in V8+.enableAutoServiceReconnection()added to theBillingClientbuilder.
Locale Updates
All 9 locales (EN, EN_UK, EN_AU, ES, FR, DE, JA, ZH, PT) now include:
PurchaseError_E_STORE_BLOCKEDIapticError_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
v1.3.0 — AsyncStorage optional, Kotlin fix for RN 0.83
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
Metadata-only fix:
- Correct the
repository.urlandbugs.urlfields inpackage.jsonto point at https://github.com/iaptic/react-native-iaptic (the actual repo) instead of the previous stale URL.
No code or behaviour changes vs. 1.2.0.
1.2.0 — switch IAP layer to @iaptic/react-native-iap fork
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-storageIf 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-iap→expo prebuild→pod install→ full iOS Debugxcodebuild(BUILD SUCCEEDED), with nopatch-packageinvolved.
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
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-iapticWhy:
- The
react-native-iapExpo config plugin (withIAP, referenced as"react-native-iap"inapp.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-packagereact-native-iapindependently — 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 <4react:>=17react-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 validatedpatch-packagediff.
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-packageworkaround applied.