diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index 84ffc89703..5a54d2cc66 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,5 +1,24 @@ ### New Features -* `Trusted Entitlements`: re-enable public API (#2621) via NachoSoto (@NachoSoto) +* `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) diff --git a/CHANGELOG.md b/CHANGELOG.md index af43401a5d..1be222f4f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,25 @@ ## 4.25.0 ### New Features -* `Trusted Entitlements`: re-enable public API (#2621) via NachoSoto (@NachoSoto) +* `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)