I want to use the iOS subscription in-app purchase. When I do a purchase. I receive a transaction via the transaction listener. This gives me some information like: state, identifier , productIdentifier and more.
Awhile ago, I tried to get IAP Subscriptions to work, I also ran into a dead end.
I hope Rob can clarify if Subscriptions are supported by Corona and if not, if they ever will be. I believe Apple is trying to get developers to steer in this direction.
I’ve been putting together iOS IAP subscription for a client, the subscription receipt is coming through fine, and the validation URL provides all relevant info on subscription status when passed the receipt. Kind of messy and multi stepped, but definitely possible from within Corona.
Hey Kevin have you used that script lately? Looks to not have been updated in about 7 years… just wanted to make sure it works before attempting to use it.
We have created a new IAP plugin for Apple OS’s (iOS, tvOS, macOS) that should be a drop-in for store.* but it adds some new API’s to help with receipt management which could help with subscriptions.
Reply here if you want to test and I’ll email you instructions.
@IBMHurskley1964, I’m not finding the email you’re using for the forums in our developer database. I need an email address that you’re logged into Corona with. Please email me at devrel AT coronalabs DOT com with your logged in email.
Looks like I have the links now and all emails working. I am now realising I am missing some basic knowledge on how I would test this. I assume this would be via Apple ‘TestFlight’. Any pointers would be appreciated as testing here thus far is fairly straight forward without any access to Store prior to publishing… UPDATE…
I just implemented this new iap api. I can now easily see the required ‘expires_date’ of my subscription.
I have one note!
When I buy a subscription and request the receipt, with store.receiptDecrypted(). I see in the recept’s field ‘in_app’ the complete history of all the subscriptions i bought in the past. In my case I see 60 entries (in the sanbox environment). The last entry is the one I need. I kind of expected just 1 entry in ‘in_app’ field.
But when I do a restore, I get all 60 transaction in restore state. All these 60 transaction again have 60 entries in the ‘in_app’ field, if I request the receipt. This seems a bit too much to me. But good usable. I just need the last entry in ‘in_app’ from the last transaction.
is this intended behavior?
I kind of remember from many years ago on x-code. I also saw much redundant data when working with receipts and restores. But I am not sure anymore.
No, not via TestFlight. Just build and app and copy to iOS device with ‘Developer’ profile (not a wildcard profile). When developer profile is used the iap sandbox environment is used.