> ## 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 Flutter SDK to the latest version.

## Overview

The Encore Flutter SDK is published as the public **`encore_flutter`** package on [pub.dev](https://pub.dev/packages/encore_flutter). Because the plugin bundles the native iOS (`EncoreKit` CocoaPod) and Android (`com.encorekit:encore` AAR) SDKs, updating is a two-part flow: bump the Dart package, then refresh the native iOS pods so the updated `EncoreKit` binary is picked up.

***

## Check the Current and Latest Version

Your currently resolved version is recorded in `pubspec.lock`. The latest published version is listed on the package's [pub.dev page](https://pub.dev/packages/encore_flutter).

You can also check from the command line:

```bash theme={null}
flutter pub outdated
```

This lists your current, upgradable, and latest resolvable versions for every dependency, including `encore_flutter`.

***

## Update the Package

<Steps>
  <Step title="Bump the version constraint">
    In your `pubspec.yaml`, raise the `encore_flutter` version constraint to allow the latest release published on [pub.dev](https://pub.dev/packages/encore_flutter):

    ```yaml theme={null}
    dependencies:
      encore_flutter: ^X.Y.Z   # replace with the latest version from pub.dev
    ```

    Alternatively, upgrade in place within your existing constraint without editing `pubspec.yaml`:

    ```bash theme={null}
    flutter pub upgrade encore_flutter
    ```
  </Step>

  <Step title="Fetch the updated Dart package">
    ```bash theme={null}
    flutter pub get
    ```
  </Step>

  <Step title="Refresh the native iOS pods">
    The `EncoreKit` CocoaPod is pulled in transitively by the plugin. Run `pod install` with `--repo-update` so CocoaPods fetches the newest spec and installs the updated native binary:

    ```bash theme={null}
    cd ios && pod install --repo-update && cd ..
    ```

    <Note>
      Android requires no separate step — the updated `com.encorekit:encore` AAR is resolved automatically by Gradle on your next build.
    </Note>
  </Step>

  <Step title="Rebuild the app">
    ```bash theme={null}
    flutter run
    ```

    Building fresh ensures both the Dart layer and the updated native SDKs are compiled in.
  </Step>
</Steps>

***

## Verify the Update

Confirm the resolved version in `pubspec.lock` matches the latest release, or re-run:

```bash theme={null}
flutter pub outdated
```

In the `flutter pub outdated` output, the **Current** and **Latest** columns for `encore_flutter` should now match — confirming you're on the newest release.

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