Subscription end date from receipt are not fetched right.

I have an app in store which has in app subscription, while checking for renewal it is not providing me exact end date of subscription based on which I have to lock / unlock certain features. It never fetch right date to verify, this is seriously a little thing which seems to be too complicated.

Replies

Tough to determine what is being used here but if using StoreKit2 then currentEntitlements handles much of this for you. https://developer.apple.com/documentation/storekit/transaction/3851204-currententitlements

Keep in mind the expirationDate is part of the transaction: https://developer.apple.com/documentation/storekit/transaction/transaction_properties