2.4.8
0.55.4
iOS 12.x +
I should get list of products
I get empty array
Real device -> iPhone SE, iOS 12.3.1
Emulator -> iOS 12.1 (Multiple devices)
In-App Purchase is created in Ready to Submit status [Non-Consumable]
const itemSkus = Platform.select({
ios: [
'my_product_id'
],
});
async componentDidMount() {
await RNIap.initConnection()
const products = await RNIap.getProducts(itemSkus)
console.log(products)
}
initConnection returns true
getProducts returns []
Sku array with my_product_id
match the one from App Store Connect
I did basically everything from Q/A and different blog posts
without any luck.
Update:
I did some additional debugging and it looks like RNIapIos.getItems(skus)
returns []
Related #407. <== Could you follow the related issue and come back?
@hyochan Right, my Paid Apps agreements was not active but pending .. Closing :)
Thanks for help.
I am facing the same issue, getting an empty array from the getProducts() method.
react-native-iap - 2.4.8 & react native version - 0.56.0.
It is working properly on native iOS with the same id.
How to resolve it?
i strongly suggest you to check out link . i mean controll your build phaese->link binary with libraries (i was not able to see libRNAap.a even i did react-native link react-native-iap) then i linked manually and its working now.
Thanks @srhtylmz19 fixed it for me!
I solved it! I am using these versions,
react-native-iap: ^4.3.0
react-native: 0.60.5
just do it like this
const itemSkus = Platform.select({
ios: [
'100coins' // just remove bundle id from product id
],
android: [
'100coins' // just remove bundle id from product id
]
});
I had this issue and it turns out I'd skipped installing the RNIap in the pod file
ie. copy and paste this pod 'RNIap', :path => '../node_modules/react-native-iap'
then cd ios && pod install && cd ..(run terminal commands from the application directory)
Most helpful comment
Thanks @srhtylmz19 fixed it for me!