fetchProducts failing on 14.x #3025
-
I feel the should be an issue report, but I don't have the option so over to the wise people in the forum RN 0.81.4
The call useEffect(() => { results in the warning react-native-iap] Unknown iOS product type "auto-renewable-subscription", defaulting to NonConsumable. I have checked using the manage options in developer->sandbox-apple-ID and can purchase a subscription so I know my subscriptions are available in the sandbox store. However, the code below fails because no products are retuned from the fetchProduct call Here is my full code import React, { useEffect, useState } from 'react'; const productIds = [ interface SubscriptionPurchaseModalProps { const SubscriptionPurchaseModal: React.FC = ({ const {
// Storefront check useEffect(() => { useEffect(() => { useEffect(() => { useEffect(() => {
}, [connected, fetchProducts]); const handleAppleSubscribe = async (productId: string) => { const handleExternalSubscribe = () => { const openTermsLink = () => Linking.openURL('https://example.com/terms'); // anonymized return (
); export default SubscriptionPurchaseModal; const styles = StyleSheet.create({ |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 27 replies
-
That warning about Common causes:
👉 Please double-check your setup against our guide: Once those conditions are met, |
Beta Was this translation helpful? Give feedback.
-
Also having trouble with subscriptions. fetchProducts is not finding my subscription that is active and working even on v13. Not seeing any error or warning though.
|
Beta Was this translation helpful? Give feedback.
-
@hyochan - I am still struggling to get the products[] to update. I have turned on the debug in storekit and can see the subscription is pulled from the sandbox correctly, but products array is not being updated. [RnIap] fetchProducts.native result: [{"type":"subs","id":"com.headcoachapp.sub.monthly_individual"}] |
Beta Was this translation helpful? Give feedback.
-
Yes, I've reviewed the example code dozens of times... I can't see a difference in my code compared to the example code. I am on RN 0.81.4, "react-native-iap": "^14.4.1", and "react-native-nitro-modules": "^0.29.6". I am using XCode 16.2 with platform: ios '16.0' This whole code is self-contained, so there is no other reference to iap in the code apart from the component below. I am not using an IapProvider as I believe that was removed for 13 onwards. I know that the product is fetched from Apple as I see the [RnIap] message I included above. I am just not seeing products being updated. `
` |
Beta Was this translation helpful? Give feedback.
@Richard-HeadCoach The main issue is that when you call
the results go into
subscriptions
, notproducts
.That’s why your console shows fetched items but the UI stays empty.
✅ Fix:
and render:
Your
fetchProducts
call is already correct — no need to change its syntax.Also, check the official example here:
👉 https://hyochan.github.io/expo-iap/docs/examples/subscription-flow
It shows…