I am having issues with renewing subscriptions.
From Session 705 Engineering Subscriptions WWDC 2018 - Does the User Have an Active Subscription?, I know that the way to answer to these questions is:
- Find transaction with the latest expires_date
- Date in past shows user is not subscribed
Subscription Period ---------------------------------------------------------> Time ---> USER HAS NO AN Active Subscription
expires_date Today
Subscription Period ---------------------------------------------------------> Time ---> USER HAS AN Active Subscription
Today expires_date
But I get the following data:
▿ 0 : InApp
▿ expiresDate : 2020-05-02 21:31:29 +0000
▿ 1 : InApp
▿ expiresDate : 2020-05-02 21:36:29 +0000
▿ 2 : InApp
▿ expiresDate : 2020-05-02 21:41:29 +0000
▿ 3 : InApp
▿ expiresDate : 2020-05-02 21:46:29 +0000
▿ 4 : InApp
▿ expiresDate : 2020-05-02 21:51:51 +0000
▿ 5 : InApp
▿ expiresDate : 2020-05-02 21:56:51 +0000 <====== transaction with the latest expires_date
let today = Date()
2020-05-03 21:48:29 +0000
Transaction with the latest expires_date is before Today.
Why is this happening?