Skip to content

EntitlementInfo.isActive returns true if requestDate == expirationDate#1684

Merged
beylmk merged 2 commits into
mainfrom
fix-isactive
Jun 10, 2022
Merged

EntitlementInfo.isActive returns true if requestDate == expirationDate#1684
beylmk merged 2 commits into
mainfrom
fix-isactive

Conversation

@beylmk

@beylmk beylmk commented Jun 9, 2022

Copy link
Copy Markdown
Contributor

Giving the end users back a millisecond of entitlement access, and hopefully solving a Sandbox issue wherein entitlements are returned as inactive because expirationDate == latestPurchaseDate for 30 second subscription renewals.

Did I miss any repercussions around making this change?

@beylmk beylmk requested a review from a team June 9, 2022 23:57
@NachoSoto

Copy link
Copy Markdown
Contributor

I think this is safe.
I would add a test case for it though.

}

func testSubscriptionActiveIfExpiresDateEqualsRequestDate() throws {
let expirationAndRequestDate = "2019-08-16T10:30:42Z"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful

@NachoSoto

Copy link
Copy Markdown
Contributor

@aboedo this looks good to you too?

@aboedo

aboedo commented Jun 10, 2022

Copy link
Copy Markdown
Member

looks good, although you're stealing a second's worth of subscription away from folks 😅 (jk, a second in a subscription in production is nothing)

@beylmk beylmk merged commit 11a1dca into main Jun 10, 2022
@beylmk beylmk deleted the fix-isactive branch June 10, 2022 19:08
@NachoSoto NachoSoto mentioned this pull request Jun 10, 2022
NachoSoto added a commit that referenced this pull request Jun 10, 2022
_This release is compatible with Xcode 14 beta 1_

### Bug fixes

* `EntitlementInfo.isActive` returns true if `requestDate == expirationDate` (#1684) via beylmk (@beylmk)
* Fixed usages of `seealso` (#1689) via NachoSoto (@NachoSoto)
* Fixed `ROT13.string` thread-safety (#1686) via NachoSoto (@NachoSoto)
* `PurchasesOrchestrator`: replaced calls to `syncPurchases` with posting receipt for an individual product during SK2 purchases (#1666) via NachoSoto (@NachoSoto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants