lundi 9 mars 2020

IAP verifyReceipt url should be sandbox or buy url on the server when submitting the app to Apple Store?

I am about to submit my iOS app to Apple Store but there are some unclear points that I couldn't figure it out.

During the testing process I used Sandbox. I understand that a 1 month subscription's expiry date equals to 5 minutes in Sandbox. So when I purchase a product, the app sends a request to my server to validate the receipt. The server then calls the "https://sandbox.itunes.apple.com/verifyReceipt" url and the expiry date I receive like:

Purchase Date: 07/03/2020 - 16:45 Expires Date: 07/03/2020 - 16:50

I am doing the receipt validation on server as Apple suggested.

After I completed the IAP development, I have updated the url on server as "https://buy.itunes.apple.com". Then I tried to buy a product with my current Apple Id -not with a Sandbox account. This time the app returned "Cannot connect to iTunes" error. It make sense because my app isn't in Apple Store yet

My question is, when I submit my app how will Apple test my app? Should I keep the "https://sandbox.itunes.apple.com/verifyReceipt" url on the server and then once Apple approves the app replace the url with "https://buy.itunes.apple.com"? This part is confusing.

Aucun commentaire:

Enregistrer un commentaire