xref: /expo/docs/pages/build/updates.mdx (revision aeb01766)
1---
2title: Use EAS Update
3description: Learn how to use EAS Update with EAS Build.
4---
5
6EAS Build includes some special affordances for Expo's [`expo-updates`](/versions/latest/sdk/updates.mdx) library. In particular, you can configure the [`channel`](/eas-update/how-it-works/#distributing-builds) property in **eas.json** and EAS Build will take care of updating it in your native project at build time.
7
8This document covers concerns specific to using `expo-updates` library with EAS Build. For more general information about configuring the library with EAS Update, see [Getting started with EAS Update ](/eas-update/getting-started).
9
10## Setting the channel for a build profile
11
12Each [build profile](./eas-json.mdx#build-profiles) can be assigned to a channel, so updates for builds produced for a given profile will pull only those releases that are published to its channel.
13
14The following example demonstrates how you might use the `"production"` channel for production builds, and the `"staging"` channel for test builds distributed with [internal distribution](internal-distribution.mdx).
15
16```json eas.json
17{
18  "build": {
19    "production": {
20      "channel": "production"
21    },
22    "preview": {
23      "channel": "staging",
24      "distribution": "internal"
25    }
26  }
27}
28```
29
30## Binary compatibility and runtime versions
31
32Your native runtime may change on each build, depending on whether you modify the code in a way that changes the API contract with JavaScript. If you publish a JavaScript bundle to a binary with an incompatible native runtime (for example, a function that the JavaScript bundle expects to exist does not exist) then your app may not work as expected, or it may crash.
33
34We recommend using a different [runtime version](/distribution/runtime-versions.mdx) for each binary version of your app. Any time you change the native runtime (in managed apps, this happens when you add or remove a native library, or modify **app.json**), you should increment the runtime version.
35
36## Previewing updates in development builds
37
38Updates published with the `runtimeVersion` field can't be loaded in Expo Go; instead, you should use [expo-dev-client](/clients/introduction.mdx) to create a development build.
39
40## Environment variables and `eas update`
41
42Environment variables set on the `env` field in build profiles are not available when you run `eas update`. Learn more about using [environment variables with EAS Update](/eas-update/environment-variables).
43