Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trusted Entitlements: improved documentation #2782

Merged
merged 3 commits into from
Jul 11, 2023
Merged

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Jul 11, 2023

I've also added a link to our new documentation page: https://rev.cat/trusted-entitlements

Screenshot 2023-07-11 at 08 47 19

Screenshot 2023-07-11 at 08 50 24

I've also added a link to our new documentation page: https://rev.cat/trusted-entitlements
@NachoSoto NachoSoto added the docs label Jul 11, 2023
@NachoSoto NachoSoto requested a review from a team July 11, 2023 15:47
/// Defaults to ``Configuration/EntitlementVerificationMode/disabled``.
///
/// The result of the verification can be obtained from ``EntitlementInfos/verification`` or
/// ``EntitlementInfo/verification``.
///
/// - Note: This requires iOS 13+.
/// - Important: This feature is currently in beta.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've also removed this.

@NachoSoto NachoSoto enabled auto-merge (squash) July 11, 2023 15:48
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Looks good!

@NachoSoto NachoSoto merged commit 460f6fd into main Jul 11, 2023
@NachoSoto NachoSoto deleted the trusted-entitlements-docs branch July 11, 2023 16:27
This was referenced Jul 11, 2023
NachoSoto added a commit that referenced this pull request Jul 11, 2023
**This is an automatic release.**

### New Features
* `Trusted Entitlements`: (#2621) via NachoSoto (@NachoSoto)

This new feature prevents MitM attacks between the SDK and the
RevenueCat server.
With verification enabled, the SDK ensures that the response created by
the server was not modified by a third-party, and the entitlements
received are exactly what was sent.
This is 100% opt-in. `EntitlementInfos` have a new `VerificationResult`
property, which will indicate the validity of the responses when this
feature is enabled.

```swift
let purchases = Purchases.configure(
  with: Configuration
    .builder(withAPIKey: "")
    .with(entitlementVerificationMode: .informational)
)
let customerInfo = try await purchases.customerInfo()
if !customerInfo.entitlements.verification.isVerified {
  print("Entitlements could not be verified")
}
```

You can learn more from [the
documentation](https://www.revenuecat.com/docs/trusted-entitlements).

### Other Changes
* `TrustedEntitlements`: new `VerificationResult.isVerified` (#2788) via
NachoSoto (@NachoSoto)
* `Refactor`: extracted `Collection.subscript(safe:)` (#2779) via
NachoSoto (@NachoSoto)
* `Trusted Entitlements`: added link to docs in
`ErrorCode.signatureVerificationFailed` (#2783) via NachoSoto
(@NachoSoto)
* `Trusted Entitlements`: improved documentation (#2782) via NachoSoto
(@NachoSoto)
* `Tests`: fixed flaky failure with asynchronous check (#2777) via
NachoSoto (@NachoSoto)
* `Integration Tests`: re-enable signature verification tests (#2744)
via NachoSoto (@NachoSoto)
* `CI`: remove `Jazzy` (#2775) via NachoSoto (@NachoSoto)
* `Signing`: inject `ClockType` to ensure hardcoded signatures don't
fail when intermediate key expires (#2771) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
@vegaro vegaro added pr:other and removed pr:docs labels Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.37%. Comparing base (1f83693) to head (bf7bb62).
Report is 926 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2782      +/-   ##
==========================================
- Coverage   86.49%   86.37%   -0.13%     
==========================================
  Files         214      214              
  Lines       15379    15379              
==========================================
- Hits        13302    13283      -19     
- Misses       2077     2096      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants