0

I have had a hard time finding a good tutorial that goes through the entire auto renewal implementation process, so I am confused as to how I get the receipt from the initial purchase. I have created a server-side app to call iTunes for receipt updates, but it requires that a receipt and shared secret be passed in.

Other points:

1) I am able to pull my in-app product from iTunes Connect from within my app, so I know it is setup correctly via productsRequest. I don't think I even need this code since I am not creating a storefront (assume I don't need one since it is auto renewal), but I just wanted to see if I could pull the product information and I could.

2) I have added a Transaction Observer to my app, along with a Payment Queue routine to trap the transaction, but when I run the app on my iPhone the first time nothing fires for these rotuines.

3) My server-side code calls iTunes once a day on expired and active accounts to see if there is an updated receipt. Not sure if this is working yet, because I am not sure how I get the first receipt.

Any help would be greatly appreciated and any good links on auto renewable subscriptions would be great as well.

Thanks in advance.

Captain Obvlious
  • 19,754
  • 5
  • 44
  • 74

1 Answers1

1

It took me a month of back and forth with Apple to get this right. The FIRST purchase MUST be from within your application. It is NOT done on iTunes. You provide the app on iTunes either free or for a nominal charge, then ask the user to SUBSCRIBE from a store or view you build the first time they open the app. I was so confused by this. I have spent 2 weeks trying to work through this so the app does not start if there is no original receipt someplace. I hope you can figure some logic that is simpler than mine!

Testing the first purchase will be a pain, since you will have to make a new test user EVERY TIME you want to test the purchase receipt.

Once you have an original transaction, you can test processes using the RESTORE PURCHASE method you build so it works across all devices, and to replace on new devices.

Hope this helps.

PrivusGuru
  • 273
  • 1
  • 2
  • 12
  • As @privusguru suggests, you **will** need to implement a storefront to facilitate that first subscription purchase and to help a user change durations if that's relevant. After that the user will manage their subscription in the settings app. – Andrew Sep 12 '12 at 06:29