Access to SKPaymentTransactionObserver?

For kids apps, Apple requires a parental gate when the app is opened by clicking on a promoted IAP in the App Store (which automatically calls the purchase function upon opening the app.)

Apple documentation states that the “delegate method in the SKPaymentTransactionObserver protocol” allows a return of “true” to continue the purchase or “false” to cancel it.

Do we have that much access to the SKPaymentTransactionObserver through Solar2d? How can we access it?

would you like to specify which method should return true? Because if you’re about paymentQueue:shouldAddStorePayment:forProduct: it always returns true.
To process this purchase, you must initialize the store and your handler would get a purchase event from what I understand. Just be ready to react to the purchase without user initiating the purchase.

Okay thanks. What I really need to accomplish is to show a parental gate before the purchase occurs. We don’t want to open the parental gate every time the app is opened-only when it is opened from a promoted IAP. How can we determine that the app was opened from a promoted IAP?

1 Like

Same here! A parental gate is needed for Apple to allow the promoted IAPs.

Can you give me some docs?

OK. This seems like it

Yes! Thank you for finding it! Based on that information, my questions are: Do we have access to shouldAddStorePayment in Solar2D? How do we determine which promoted IAP has opened the app and how do we set shouldAddStorePayment to false?

This would be very important to implement, especially for those of us making games for kids, right?

1 Like

Any updates on this?

This is something that we also want to implement.

Do we have access to the SKTransactionObserver payment queue mentioned in this Apple post?

It looks like this could solve our problem if we can access it (or access anything that allows us to see what product is being purchased before the purchase is automatically executed)

Has anyone solved this problem yet?

Any idea how to implement this?
I was thinking about it and honestly I don’t have an idea how the workflow should be lookin from the Lua point of view.