getProducts() returns only Product fields: price, currency, productId
See original GitHub issueVersion of react-native-iap
5.2.0
Version of react-native
0.63.3
Platforms you faced the error (IOS or Android or both?)
IOS
Expected behavior
When I call getProducts() or getSubscriptions() it should return me a Product objects array with all fields described in docs similar to this
{ productId: 'com.XXX.sdk38.annual', subscriptionPeriodUnitIOS: 'YEAR', description: 'Activate Premium features on XXX', introductoryPrice: '', title: 'Annual', introductoryPriceSubscriptionPeriodIOS: '', introductoryPriceNumberOfPeriodsIOS: '', discounts: [ { localizedPrice: '€0,00', numberOfPeriods: '1', type: 'SUBSCRIPTION', identifier: 'com.XXX.sdk38.tryannual', paymentMode: 'FREETRIAL', price: '0', subscriptionPeriod: 'MONTH' } ], type: 'Do not use this. It returned sub only before', localizedPrice: '€54,99', introductoryPricePaymentModeIOS: '', price: '54.99', currency: 'EUR', subscriptionPeriodNumberIOS: '1' }
Actual behavior
When I call getProducts() or getSubscriptions() it returns me a product with only 3 fields (see attached screenshot):
- price
- currency
- productId
{price: "19.99", currency: "USD", productId: "hiii.premium1a"}
Tested environment (Emulator? Real Device?)
Real device. Production scheme with build configuration Debug and Debug executable set to true. But generally, we’ve noticed the same behavior on prod.
Steps to reproduce the behavior
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:13 (6 by maintainers)
I’ve had the same problem when upgrading from 5.1.1 to 5.1.3. It doesn’t affect every device/account, but we saw it happening in production for ~800 users. I could not find a specific pattern, but reverting to 5.1.1 fixed it.
#1246 has been released to
5.2.6
. Let’s see how it goes.