El código a continuación funciona bien para Android como se esperaba, pero para iOS no funciona. Traté de administrarlo ComponentDidUpdate pero allí se llama varias veces.
componentDidMount() { BackHandler.addEventListener('hardwareBackPress', () => { BackHandler.exitApp(); }); RNIap.initConnection().then(() => { RNIap.flushFailedPurchasesCachedAsPendingAndroid().catch(() => { }).then(() => { this.getSubscriptions(); this.purchaseUpdateSubscription = purchaseUpdatedListener(async (purchase: InAppPurchase | SubscriptionPurchase | ProductPurchase) => { this.setState({visibility:false}) this.purchaseConfirmed(purchase,"componentDidMount") console.log("componentDidMount"); const receipt = purchase.transactionReceipt; if (receipt) { await RNIap.finishTransaction(purchase, false); } }); this.purchaseErrorSubscription = purchaseErrorListener((error: PurchaseError) => { this.setState({visibility:false}) // console.warn('purchaseErrorListener', error); }); }) }) }