Skip to main content
Question

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

  • 15 July 2024
  • 1 reply
  • 19 views

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

Userlevel 2
Badge +4

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.