Question 1:
I have read the Apple docs regarding subscriptions but I'm still unsure if it's possible to get the expiry date for an auto-renewable subscription from the receipt without contacting Apple servers as of iOS 9? Does this makes sense?
Question 2
Currently what I'm doing to get the auto-renewable subscription expiry is:
use [[NSBundle mainBundle] appStoreReceiptURL] and proceed to convert the receipt to a base 64 string
create a dictionary where I include this receipt-data and the shared secret
convert this dictionary into a JSON string
send this JSON string to https://sandbox.itunes.apple.com/verifyReceipt
return the JSONized receipt dictionary which was received as a reply from the app store
get the expiry date from the expires_date_ms inside the latest_receipt_info dictionary
I'm not entirely sure if this is correct since according to the documentation it's not possible to achieve a secure link between the App Store and a device (which I'm currently doing). In fact the documentation states that I'll need my own server which will communicate with the App Store for me (https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1).
Is this acceptable approach or I'll need my own server? If I need my own server can someone kindly guide me in the right direction on how to set this up?
N.B: I'm performing receipt validation for non-consumable and consumable in-app purchases whenever a purchase is made using local validation using OpenSSL. So that should be allright.
Thanks in advance.