> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Updating the SDK

> How to update the Encore SDK to the latest version.

## Overview

The Encore SDK is a **public Swift Package** — updating is the standard Swift Package Manager flow, with no token or authenticated URL required.

***

## Update via Xcode

1. In Xcode's left sidebar, expand **Package Dependencies**
2. Find and right-click the **Encore** package (resolved from `https://github.com/EncoreKit/ios-sdk`)
3. Select **Update Package**

Alternatively, select **File → Packages → Update to Latest Package Versions** to update all packages at once.

<Note>
  If your project still points at an old `https://www.github.com/...` URL, update the package **Location** to `https://github.com/EncoreKit/ios-sdk` (Your Project → Package Dependencies → the Encore package → Location column). No token is needed.
</Note>

***

## Verify the Update

After updating, check the package version in Xcode's Package Dependencies to confirm you're on the latest release.

***

## Updating to 1.4.57 or Later — Purchase Handler Return Value

<Warning>
  **One-time migration check for subscription managers.** If you use a subscription manager (RevenueCat, Superwall, Adapty, Qonversion, or your own billing), make sure your `onPurchaseRequest` handler returns a **`Bool`**. The older `... async throws -> Void` overload is deprecated — it can't signal success or failure, so the offer sheet's dismiss behavior is unreliable. Integrations created on 1.4.57 or later already use the `Bool`-returning form, so this check only applies when migrating an older integration.
</Warning>

Return `true` once the purchase succeeds so Encore auto-dismisses the offer sheet; return `false` (or throw) to keep it up so the user can retry. For example, with RevenueCat:

```swift theme={null}
Encore.shared.onPurchaseRequest { purchaseRequest in
    let products = try await Purchases.shared.products([purchaseRequest.productId])
    guard let product = products.first else { return false }
    let result = try await Purchases.shared.purchase(product: product)
    return !result.userCancelled
}
```

See [onPurchaseRequest()](../sdk-reference/on-purchase-request) for StoreKit, Adapty, Qonversion, and custom subscription-manager examples.

***

If you encounter issues after updating, reach out to [admin@joinyaw.com](mailto:admin@joinyaw.com).
