Skip to main content
Question

const {customerInfo} = await Purchases.purchasePackage(pack) ; doesnt return anything. 4th time ive seen this question and all unanswered

  • July 14, 2024
  • 1 reply
  • 99 views

Forum|alt.badge.img+2

Testing in Sandbox

My config seems to be correct,
I can buy the in app purchase and it goes through to revenue cat

The issue is when I call 
 

const handlePurchase = async (pack) => {

try {

console.log("Initiating purchase for package: " + pack.product.identifier);

const {customerInfo} = await Purchases.purchasePackage(pack);

console.log("Purchase completed successfully");

} catch (error) {

if (error && error.userCancelled) {

console.log("Purchase cancelled by user");

} else {

console.error("Error during purchase:", error.message);

}

}

};

Nothing executes after customerInfo, not even the log statement. it just hangs indefinetly

please help as this is the blocker to my app going live. Thank you.

This post has been closed for comments

1 reply

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 240 replies
  • July 17, 2024

Hi @ryan-zambrano-2d64d0, thanks for posting this. Are you using Vue by chance? I've seen a similar behavior when a reactive object is passed in this call in iOS, and the toRaw() method is needed first.

If not, could you let me know if you're using a different framework? Thanks.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings