title: Non-renewing Subscriptions: Removed From Receipt?
body: <p>I'm implementing in-app purchases for my app (to be released), and providing support for iOS6 and iOS7. My question has to do with differences between non-renewing subscription mechanisms across iOS6 and iOS7, and more specifically about how a restore is implemented. To accommodate both iOS6 and iOS7, I have implemented a server-side solution to enabling a restore. I optionally allow the user to create a username/password that can be used on a different device (or the same device if data is lost) to do a restore. I have most of this basically working but as I've been progressing with my testing, I've found something curious. </p>
  
  <p>The initial part of my restore process for iOS7 uses SKReceiptRefreshRequest to refresh the receipt in the app. When I delete the app from an iOS7 device, re-install (there is no receipt at this point; tested using iExplorer), and do a restore, SKReceiptRefreshRequest restores 10 purchases (that I've created during testing, for this particular user). One of these is a non-consumable, and <strong><em>nine of the receipts are non-renewing</em></strong>. This confuses me. From the Apple docs, I expected only to see non-consumable purchases in the refreshed receipt. From <a href="https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html" rel="noreferrer">https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html</a>:</p>
  
  <blockquote>
    <p>“Consumable Products and Non-Renewing Subscriptions: The in-app
    purchare receipt for a consumable product or a non-renewing
    subscription is added to the receipt when the purchase is made. It is
    kept in the receipt until your app finishes that transaction.
    After that point, it is removed from the receipt the next time the
    receipt is updated—for example, when the user makes another purchase
    or if your app explicitly refreshes the receipt.”</p>
  </blockquote>
  
  <p>As relating to non-renewing subscriptions, from <a href="https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf" rel="noreferrer">https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf</a>:</p>
  
  <blockquote>
    <p>Use iCloud or your own server to track purchases and allow user to
    restore purchased subscriptions to all iOS devices owned by a single
    user</p>
  </blockquote>
  
  <p>And the following table from (<a href="https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Products.html" rel="noreferrer">https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Products.html</a>)</p>
  
  <p><img src="https://i.stack.imgur.com/cNOkq.png" alt="enter image description here"></p>
  
  <p>Anyone have any insights?</p>
  
  <blockquote>
    <p><strong><em>Question:</em></strong> Why does SKReceiptRefreshRequest leave purchases for non-renewing products in the receipt? Is this a bug in the Apple docs
    or is there something else going on?</p>
  </blockquote>
  
  <p><strong>2/23/14; Update:</strong> I have recently put a bug report into Apple on this. No word back yet. Though, in reality, I don't want this "bug" to go away!</p>
  
  <p><strong>10/20/15; Update:</strong> It seems that Apple has actually resolved this "bug". Now, when I do a restore using <code>SKReceiptRefreshRequest</code> (which seems to be Apple's recommended method of doing a restore, see <a href="https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html" rel="noreferrer">https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html</a>), I now am <em>not</em> getting the non-renewing subscription purchases showing up in the receipt. I am only getting non-consumables (my app has only non-renewing subscriptions and non-consumables purchases). I'm going to submit a bug report to Apple immediately after I write this as at a minimum, their docs are ambiguous on the expected behavior.</p>
  
  <p>So far my testing of this has included my app running on iOS 8.4 and iOS9 (9.1 beta actually as I don't have the right device running the production release), and so it appears this is a server side change with Apple and not strictly speaking an iOS/device side change. Also note that all of my testing so far is on a development build of my app, and so is in the in-app purchase sandbox. I'll be running a production test shortly.</p>
  
  <p><strong>12/3/15; Update;</strong> At the prompting of Apple Tech Support, I ran some more tests. This time, on an iPad running iOS9.2 beta 4 (13C75). It seems we're back to "normal" now with non-renewing subscriptions. That is, when I do a restore, I'm seeing non-renewing subscriptions in the receipt again.</p>