Panos,

Ok… seems to be working now.   I’m no longer getting “completed”, but I am 
consistently getting “paymentRecieved”… and I can make that work.   Obviously, 
I don’t really understand how this all works… but it’s working!

Thank you again for your help!
-Dan


From: use-livecode <[email protected]> on behalf of 
panagiotis m via use-livecode <[email protected]>
Date: Tuesday, August 15, 2023 at 10:24 AM
To: How to use LiveCode <[email protected]>
Cc: panagiotis m <[email protected]>
Subject: Re: Oddities with iOS IAP
Hello Dan,

Just a rough guess, in the purchaseStateUpdate msg, you have:

 mobileStoreConfirmPurchase pProductID //Inform the store that the purchase
identifier productID was successfully delivered
 mobileStoreDisablePurchaseUpdates

in both cases for paymentReceived and restored.

Could you try commenting out the mobileStoreDisablePurchaseUpdates in these
2 cases? Once you call mobileStoreConfirmPurchase, it informs the store
that the purchase was successful, and then the store sends another
"purchaseStateUpdate" with state=complete.

But if you call mobileStoreDisablePurchaseUpdates just after
mobileStoreConfirmPurchase then this stops the communication with the
store. I suggest having mobileStoreDisablePurchaseUpdates just in the
"complete" case and remove it from "paymentReceived" and "restored".

Note that on Android (if I remember correctly)
mobileStoreEnablePurchaseUpdates/mobileStoreDisablePurchaseUpdates do not
actually do something - but they are added for consistency.

If you do this change, and still see the delay, then it is likely a
TestFlight/Sandbox issue. Note that Apple's sandbox servers are slower than
the actual ones used by StoreKit.
(e.g.
https://community.revenuecat.com/sdks-51/testflight-clicking-subscriptions-or-iaps-has-long-delay-2687
)

kind regards,
Panos
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to