Skip to content
Discussion options

You must be logged in to vote

This is a known issue in the iOS Sandbox environment. The Sandbox environment can be unreliable and sometimes doesn't return purchase results properly.

As mentioned in the comments:

"Does it behave the same in a none sandbox environment? I found the same issue and had to use the purchaseUpdatedListener to retrieve the purchase details instead of the hooks"

Solutions

1. Use v14+ with onPurchaseSuccess callback (Recommended)

In v14+, use the useIAP hook with callbacks:

import { useIAP } from 'react-native-iap';

const { requestPurchase, finishTransaction } = useIAP({
  onPurchaseSuccess: async (purchase) => {
    // This is more reliable than watching currentPurchase
    console.log('Purc…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by baesumin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
3 participants