Question: Promoted InApp Purchase Parental Gate?

I got an rejection for my kids app from Apple because of this:

**You have selected the Kids category for your app, but it includes links out of the app or purchasing opportunities without first obtaining parental permission.

Specifically, when the user taps a promoted in-app purchase product on the App Store, the in-app purchase flow within the app is not behind a parental gate.**

Now I wonder how I can do this technically with Corona? Is anybody here who can help me and let me know where I can add such a parental gate for promoted in-app purchases in the code and how?

Thank you for your help!

Documentatiooooooooooooooooooooooon!

I can’t believe how many times I’ve responded to people this week about searching their question via Google or the docs first. :smiley:

On iOS, you can use https://docs.coronalabs.com/api/library/store/canMakePurchases.html

This is not exactly what I need. I want to know where to use a parental gate in the code, so when a person is clicking on a promoted inapp purchase and then downloading the game is shown the parental gate when opening the game before the purchase is made.

Right now I am accessing the store by requiring the “store” and then use store.init (transactionListener). This is bringing the user directly to the store and in the case he has clicked and downloaded the game by clicking on a promoted inapp purchase icon the purchase is made at start of the game. Apple now wants a parental gate for this and I don’t know where to add it.

I want to show the parental gate ONLY TO THE PERSONS WHO ARE USING THE PROMOTED INAPP-Icons for getting the game. How can I do this?

I found this in the forum but unfortunately it never was answered:

"Hello, Thank you for your response. To clarify, when the user taps a promoted in-app purchase product on the App Store, the in-app purchase flow within the app is not behind a parental gate. Please ensure that parental gate is available when users initiate the IAP, even from promoted in-app purchase product on the App Store." My app is in the kids category and requires a parental gate for IAPs.  When it is tapped from the app store promoted IAP, it goes into the app and asks to make the purchase.  I some how need to have a parental gate with this.  Is it possible?

Any help welcome!

You can use launchArgs (in your main.lua) to get information on how your app started:
https://docs.coronalabs.com/api/event/notification/type.html

You should be able to determine if the app started through those promoted iaps. Then check if the user is even allowed to make a purchase before trying to show a parental gate.

Thanks for the info!

Is anybody using this and can tell me which launchArgs arguments/values I have to look for?

I would suggest using some prints to print the launchArgs table and see what you get. It would be nice to see what information you’re getting to help advise you better.

Rob

@d.march We are running into the same issue. Did you figure it out? I am not entirely sure how to mimic app store purchase from an IAP within the test device… 

We did some test using the Instructions here: 

https://developer.apple.com/documentation/storekit/in-app_purchase/testing_promoted_in-app_purchases

However, we don’t see any launchArgs that we can use. Does any one have any suggestions? Or are we missing something? 

We did some test using the Instructions here: 

https://developer.apple.com/documentation/storekit/in-app_purchase/testing_promoted_in-app_purchases

However, we don’t see any launchArgs that we can use. Does any one have any suggestions? Or are we missing something?