|
| 1 | +--- |
| 2 | +slug: release-14.6.3 |
| 3 | +title: Release 14.6.3 - Advanced Commerce Data & Platform Field Updates |
| 4 | +authors: [hyochan] |
| 5 | +tags: [release, ios, android, storekit2, attribution] |
| 6 | +description: React Native IAP 14.6.3 adds advancedCommerceData support for iOS attribution tracking and introduces the new google/apple platform fields with deprecation of ios/android fields. |
| 7 | +date: 2025-12-24 |
| 8 | +--- |
| 9 | + |
| 10 | +# React Native IAP 14.6.3 |
| 11 | + |
| 12 | +14.6.3 brings **advancedCommerceData** support for iOS attribution tracking using StoreKit 2's `Product.PurchaseOption.custom`, along with updated platform field naming conventions and improved type safety for Billing Programs API. |
| 13 | + |
| 14 | +<!-- truncate --> |
| 15 | + |
| 16 | +## What's New |
| 17 | + |
| 18 | +### Advanced Commerce Data for iOS |
| 19 | + |
| 20 | +This release adds support for `advancedCommerceData` in iOS purchase requests, enabling attribution tracking through StoreKit 2's custom purchase options. |
| 21 | + |
| 22 | +```typescript |
| 23 | +import {requestPurchase} from 'react-native-iap'; |
| 24 | + |
| 25 | +await requestPurchase({ |
| 26 | + request: { |
| 27 | + apple: { |
| 28 | + sku: 'com.example.premium', |
| 29 | + advancedCommerceData: 'your-attribution-token-here', |
| 30 | + }, |
| 31 | + }, |
| 32 | + type: 'in-app', |
| 33 | +}); |
| 34 | +``` |
| 35 | + |
| 36 | +This feature allows you to pass attribution data to Apple for analytics and marketing attribution purposes. The data is passed through StoreKit 2's `Product.PurchaseOption.custom` API. |
| 37 | + |
| 38 | +### New Platform Field Naming: `apple` and `google` |
| 39 | + |
| 40 | +We've introduced new, clearer platform field names for purchase requests: |
| 41 | + |
| 42 | +- `apple` (replaces `ios`) |
| 43 | +- `google` (replaces `android`) |
| 44 | + |
| 45 | +**Before (deprecated):** |
| 46 | + |
| 47 | +```typescript |
| 48 | +await requestPurchase({ |
| 49 | + request: { |
| 50 | + ios: {sku: 'premium_monthly'}, |
| 51 | + android: {skus: ['premium_monthly']}, |
| 52 | + }, |
| 53 | + type: 'in-app', |
| 54 | +}); |
| 55 | +``` |
| 56 | + |
| 57 | +**After (recommended):** |
| 58 | + |
| 59 | +```typescript |
| 60 | +await requestPurchase({ |
| 61 | + request: { |
| 62 | + apple: {sku: 'premium_monthly'}, |
| 63 | + google: {skus: ['premium_monthly']}, |
| 64 | + }, |
| 65 | + type: 'in-app', |
| 66 | +}); |
| 67 | +``` |
| 68 | + |
| 69 | +The old `ios` and `android` fields are still supported for backward compatibility but are now deprecated. We recommend migrating to the new field names. |
| 70 | + |
| 71 | +### Deprecated: `requestPurchaseOnPromotedProductIOS` |
| 72 | + |
| 73 | +The `requestPurchaseOnPromotedProductIOS()` function is now deprecated. In StoreKit 2, promoted products can be purchased directly via the standard `requestPurchase()` flow. |
| 74 | + |
| 75 | +**Before (deprecated):** |
| 76 | + |
| 77 | +```typescript |
| 78 | +// Old approach |
| 79 | +await requestPurchaseOnPromotedProductIOS(); |
| 80 | +``` |
| 81 | + |
| 82 | +**After (recommended):** |
| 83 | + |
| 84 | +```typescript |
| 85 | +import {promotedProductListenerIOS, requestPurchase} from 'react-native-iap'; |
| 86 | + |
| 87 | +// Listen for promoted product taps |
| 88 | +promotedProductListenerIOS(async (product) => { |
| 89 | + await requestPurchase({ |
| 90 | + request: {apple: {sku: product.id}}, |
| 91 | + type: 'in-app', |
| 92 | + }); |
| 93 | +}); |
| 94 | +``` |
| 95 | + |
| 96 | +This approach gives you more control over the purchase flow and integrates better with your existing error handling and UI logic. |
| 97 | + |
| 98 | +### Improved Type Safety for Billing Programs API |
| 99 | + |
| 100 | +The Billing Programs API functions now use `MutationField` types for better type inference: |
| 101 | + |
| 102 | +```typescript |
| 103 | +// These functions now have improved type safety |
| 104 | +isBillingProgramAvailableAndroid('external-offer'); |
| 105 | +createBillingProgramReportingDetailsAndroid('external-offer'); |
| 106 | +launchExternalLinkAndroid({...}); |
| 107 | +``` |
| 108 | + |
| 109 | +## OpenIAP Updates |
| 110 | + |
| 111 | +- **openiap-apple**: [1.3.2 → 1.3.7](https://github.com/hyodotdev/openiap/compare/apple-v1.3.2...apple-v1.3.7) |
| 112 | +- **openiap-google**: [1.3.14 → 1.3.16](https://github.com/hyodotdev/openiap/compare/google-v1.3.14...google-v1.3.16) |
| 113 | +- **openiap-gql**: [1.3.4 → 1.3.8](https://github.com/hyodotdev/openiap/compare/1.3.4...1.3.8) |
| 114 | + |
| 115 | +## Migration Guide |
| 116 | + |
| 117 | +### Platform Fields |
| 118 | + |
| 119 | +Update your purchase requests to use the new field names: |
| 120 | + |
| 121 | +```diff |
| 122 | +await requestPurchase({ |
| 123 | + request: { |
| 124 | +- ios: {sku: 'product_id'}, |
| 125 | +- android: {skus: ['product_id']}, |
| 126 | ++ apple: {sku: 'product_id'}, |
| 127 | ++ google: {skus: ['product_id']}, |
| 128 | + }, |
| 129 | + type: 'in-app', |
| 130 | +}); |
| 131 | +``` |
| 132 | + |
| 133 | +### Promoted Products (iOS) |
| 134 | + |
| 135 | +Replace `requestPurchaseOnPromotedProductIOS()` with the listener pattern: |
| 136 | + |
| 137 | +```diff |
| 138 | +- await requestPurchaseOnPromotedProductIOS(); |
| 139 | + |
| 140 | ++ promotedProductListenerIOS(async (product) => { |
| 141 | ++ await requestPurchase({ |
| 142 | ++ request: {apple: {sku: product.id}}, |
| 143 | ++ type: 'in-app', |
| 144 | ++ }); |
| 145 | ++ }); |
| 146 | +``` |
| 147 | + |
| 148 | +## Installation |
| 149 | + |
| 150 | +```bash |
| 151 | +npm install react-native-iap react-native-nitro-modules |
| 152 | +# or |
| 153 | +yarn add react-native-iap react-native-nitro-modules |
| 154 | +# or |
| 155 | +bun add react-native-iap react-native-nitro-modules |
| 156 | +``` |
| 157 | + |
| 158 | +Check out the [documentation](/docs/intro) for details on all features. |
| 159 | + |
| 160 | +Questions or feedback? Reach out via [GitHub issues](https://github.com/hyochan/react-native-iap/issues). |
0 commit comments