Expo SDK 38 is now available
Tags: reactnative, react, expo, news
Published: 2020-06-25 17:54:15

Today, we're announcing our summer 2020 release, ☀️😎 **Expo SDK 38 🍉☀️** ! SDK 38 continues both our focus on reliability and our investment in developer flexibility, as we work towards supporting fully customizable apps across Expo's entire suite of tools. Additionally, SDK 38 includes support for React Native 0.62, new and revamped templates, and a couple of useful new modules.

SDK 38 is the second of four [quarterly SDKs](https://dev.to/expo/expo-sdk-37-is-now-available-69g#time-based-releases) we plan to release this year. Read on for more details about what's included!

# ⏰ New Notifications API in Managed workflow

Earlier this year, we embarked on a complete rewrite of the Expo Notifications module. We're excited that the revamped API is now more predictable, lets you control your notifications more easily, and is 100% compatible with both the Bare and Managed workflows! Check out the documentation for the new `expo-notifications` API [here](https://github.com/expo/expo/tree/master/packages/expo-notifications#api).

One change we especially love is how notifications are now handled consistently across platforms. **Notification behavior now follows a simple rule of thumb:**

If the notification is triggered while the app is in background,

- it's presented immediately
- the application is *not* informed of this

If the notification is triggered while the app is in foreground,

- the application not only receives immediate information about this, but…
- it can also decide at runtime whether to display a heads-up alert or play a sound!
(For more information see the [Notification Handler documentation](https://github.com/expo/expo/tree/master/packages/expo-notifications#setnotificationhandlerhandler-notificationhandler--null-void).)

Unfortunately, in preparing this module within our 2020 commitment to time-based releases, we weren't able to include support for notification categories. We're working to land it ASAP in `expo-notifications`, and then it'll be available in the Bare workflow immediately, so sit tight!

### Migrating from the legacy Notifications API

The legacy Notifications API (`import { Notifications } from 'expo';`) remains in SDK 38 for compatibility purposes, but it is deprecated and we expect to remove it in an upcoming release.

On Android, notifications can only be forwarded to one of the two APIs at a time, so you'll need to explicitly opt into the new API for now by setting `android.useNextNotificationsApi` to `true` in your app configuration. If the value is undefined or `false`, push notifications will only be forwarded to the legacy notifications API on Android. On iOS, you can use the new API with no extra configuration.

# 🦋 Build-time Updates in Bare workflow

With our last release, we introduced `expo-updates`, a brand-new library that lets you use over-the-air updates in any React Native app. Check out [the documentation here](https://docs.expo.io/versions/latest/sdk/updates/).

We recently released an updated version of this library, `expo-updates@0.2.x`, which simplifies the workflow around updates in Bare workflow apps. Specifically, it introduces build-time updates, which means

- release builds will create and embed a **new update** from the JavaScript source on disk at build-time, rather than embedding your latest published update; and
- you no longer need to run `expo publish` before creating a release build for the first time.

For more detail, including how to upgrade from `expo-updates@0.1.x`, read [this walkthrough](https://blog.expo.io/over-the-air-updates-from-expo-are-now-even-easier-to-use-376e2213fabf).

# ⚡️ Faster Tooling, Better Performance

We're especially excited about some changes that have been in the works to make your development and bootstrapping experience even snappier!

First, we're bringing back the fastest way to create a React Native app. The new and improved `create-react-native-app` now has support for web along with iOS and Android, includes OTA updates out of the box, has 25+ templates you can choose from, and zero dependencies! Read more [here](https://github.com/expo/create-react-native-app/blob/master/README.md).

Additionally, if you choose to use the more powerful features of `expo-cli` instead, you'll notice it's a lot faster to install; we've decreased the overall disk space usage by as much as 2.6x. And if you bootstrap a new SDK 38 project, the footprint of its `node_modules` will be 13% smaller than a comparable SDK 37 project.

The performance of these packages has been improved, too; we're shipping transpiled JS rather than JSX, and have dropped prop-types in favor of TypeScript, both of which bring faster compilation times.

# 💡 Revamped tabs template: simpler, dark mode support, TypeScript

We rebuilt the tabs template in TypeScript,  removing all the fluff and focusing on the essentials needed to set developers out on a good path building their apps. We also built in dark mode support, because we've found that it's a lot easier if you think about it from the start rather than retrofitting it later on.

![The new and improved tabs template on iOS](https://dev-to-uploads.s3.amazonaws.com/i/p0x0hpbwqapb8vvrh576.png)

iOS is pictured above, but as always the template works just as well on the other platforms Expo supports: Android and Web.

# ✨ New Features

- **Authentication**
- **Google Fonts**
- **Screen Capture**
- **Status Bar**
- **Linking**
- **Slider**
- **Picker**
- **Storage**

### Reimagined Authentication

We’ve completely rewritten `expo-auth-session` with primitives like Expo WebBrowser and Crypto. This **reduces app size** and decreases the need for native rebuilds since it can be used with many different providers. We can also update constantly between SDK releases with bug fixes and feature additions! You can check out our [guides for 15+ different providers](https://docs.expo.io/guides/authentication/) which we update frequently.

### Google Fonts

![https://raw.githubusercontent.com/expo/google-fonts/master/gifs/title.gif](https://raw.githubusercontent.com/expo/google-fonts/master/gifs/title.gif)

The `@expo-google-fonts` packages for Expo allow you to easily use any of 991 fonts (and their variants) from [fonts.google.com](https://fonts.google.com/) in your Expo app.

These packages and all these fonts work across web, iOS and Android, and are free to use and open source. Read more detail [here](https://dev.to/expo/expo-google-fonts-is-released-4g58) and in [the documentation](https://docs.expo.io/guides/using-custom-fonts/#using-a-google-font).

### New Screen Capture module

To give developers more power over the security of their apps, we added the `expo-screen-capture` module, which will allow you to hide your app's content when a user is screen recording or taking screen shots; this is particularly useful if a screen displays sensitive information. For references, examples, and limitations, check out [the documentation](https://docs.expo.io/versions/latest/sdk/screen-capture/).

### New Status Bar module

We've also created an `expo-status-bar` module with a few important improvements over React Native's built-in StatusBar API. This new module sets the status bar to `translucent` by default on Android, and it also supports light and dark mode through the `style="auto"` and `style="inverted"` props. We have added `expo-status-bar` to every project template in `expo-cli`. Read [the documentation](https://docs.expo.io/versions/latest/sdk/status-bar/) and also check out the updated ["Configuring the Status Bar" guide](https://docs.expo.io/guides/configuring-statusbar/).

### Improved Linking

The new `expo-linking` package makes it easier than ever to create deep links that work in both managed and bare workflow projects, and integrates smoothly with React Navigation v5 and our Auth Session APIs.

### Third-Party Modules

Modules are extracted from React Native all the time to improve performance. To keep the runtime up to date, we've improved performance and added web support to some of the extracted packages to make them compatible with the Expo ecosystem.

The following packages are now available in the Expo client:

- `@react-native-community/slider`
- `@react-native-community/picker`
- `@react-native-community/async-storage`
- `@react-native-community/segmented-control`

Finally,  you can now use `@react-native-community/async-storage` in Managed workflow apps. This change is backwards-compatible, so you don't need to update to SDK 38 to start using it. This doesn't add any new features or improvements, but it does help you integrate more easily with other libraries that assume you use `@react-native-community/async-storage`.

These packages are not fully maintained by Expo so test coverage, TypeScript support, and web compatibility may vary. We'll continue to use only the most stable versions of packages.

# 🛠 API improvements and additions

### Background downloads and uploads with `expo-file-system`

Downloading external resources can be a difficult task with a lot of corner cases, such as handling when the application is moved to the background. To help with this, `expo-file-system` now supports background downloads, which won't be canceled when the user switches between different applications or when your device loses connection to the Internet. We've also added a new method that natively handles file uploads. For more information, check out [the documentation](https://docs.expo.io/versions/latest/sdk/filesystem/).

### New `android.softwareKeyboardLayoutMode` app.json key

One tricky part of building forms in mobile apps is that developers need to ensure that the on-screen "software keyboard" doesn't obscure the focused form element. Android lets you pick how you want this to be handled: you can resize the entire window so nothing will be drawn under the keyboard, or you can pan the window so the content is not underneath it. The native property that lets you control this is `android:windowSoftInputMode` .

In the past, all Expo apps have been configured to use the `resize` mode, but some developers have found this to be problematic for their apps because UI elements such as tab bars will be pushed up above the keyboard when it is enabled. If you would prefer to use the `pan` mode, you can now set the layout mode directly with `android.softwareKeyboardLayoutMode` in your app configuration. Find the key in [the "android" section of "Configuration with app.json"](https://docs.expo.io/workflow/configuration/#android).

### New `android.allowBackup` app.json key

Another security improvement we incorporated into this release is allowing developers to disable [Android's Auto Backup feature](https://developer.android.com/guide/topics/data/autobackup). For Expo apps built with previous SDKs, your users' app data would be automatically backed up to their Google Drive. This will remain the default in SDK 38 (as it is in Android native apps), but if your app deals with sensitive information then you may want to set this field to `false` in your app configuration.

### React Native 0.62

SDK 38 includes many of the new features and improvements that are part of React Native 0.62, including:

- Dark mode support with the `Appearance` module and the `useColorScheme` hook (note that these APIs do not support web, so you may want to use `react-native-appearance` if that's important for your app);
- **Accessibility improvements**, including new props like `accessibilityValue` and events like `onSlidingComplete`;
- [Significant improvements to React DevTools](https://reactjs.org/blog/2019/08/15/new-react-devtools.html);
- an optional **new LogBox** error and warning experience;

and lots more! Check out the React Native [changelog](https://github.com/react-native-community/releases/blob/master/CHANGELOG.md) for more details.

Flipper is currently unsupported in the Managed workflow. If you want to use Flipper, you'll need to use the Bare workflow for now (but you can still use all your [favorite Expo modules in the Bare workflow](https://docs.expo.io/introduction/managed-vs-bare/)!).

### Other fixes and improvements

There are lots of other changes included in this release! Check out the full list on our [changelog](https://github.com/expo/expo/blob/master/CHANGELOG.md).

# 🧹 Dropping SDK 34; will drop SDK 35 next release

We routinely drop SDK versions that have low usage in order to reduce the number of versions that we need to support. This release sees the end of life for SDK 34. As usual, your standalone apps built with SDK 34 will continue to work; however, SDK 34 projects will no longer work within the latest version of the Expo client. If you want to re-run `expo build`, then you’ll need to upgrade from SDK 34, preferably to SDK 38 so you won’t need to update again for a while (and also because each Expo version is better than the last!).

Our next release is planned for September and we will be dropping support for SDK 35 at that time. If your project is running on SDK 35, consider upgrading to a newer version in the coming months.

### AR removed

The AR module, which exposes the iOS ARKit library, has been experimental its entire lifetime and is not widely used. Rather than continue to maintain this library, we’ve decided to focus our limited resources elsewhere. Accordingly, the AR module has been removed from **all SDK versions** in the iOS Expo client version 2.16.0. Read more [here](https://expo.fyi/deprecating-ar).

# 🌟 ExpoKit → Bare workflow

In December, we shared our plans to spend 2020 making major investments to increasing your flexibility in customizing your apps with native code whenever and however you want. And in March, we announced that **the Bare workflow now fully replaces ExpoKit**. We’ve reached or exceeded feature parity between the Bare and ExpoKit workflows, and so we deprecated ExpoKit with SDK37, and we no longer support ejecting to ExpoKit in new projects.

As planned, SDK 38 will be the last release of ExpoKit. After SDK 38, your ExpoKit apps in the App Store and Play Store will continue to run indefinitely, but you'll need to migrate to the Bare or Managed workflows in order to get bugfixes and new features in Expo modules.

Read more details, including a guide for migrating ExpoKit projects to the Bare workflow, in [this blog post](https://dev.to/expo/time-to-start-using-expo-s-bare-workflow-expokit-is-now-deprecated-51ih).

# ⬆️ Upgrading your app

Here’s how to upgrade your app to Expo SDK 38.0.0 from 37.0.0:

- Run `expo upgrade` in your project directory (requires the latest version of `expo-cli`, you can update with `npm i -g expo-cli`).
- Make sure to check the [changelog](https://github.com/expo/expo/blob/master/CHANGELOG.md) for other breaking changes!
- Update the Expo app on your phones from the App Store / Google Play. `expo-cli` will automatically update your apps in simulators if you delete the existing apps, or you can run `expo client:install:ios` and `expo client:install:android`.
- If you built a standalone app previously, [remember](https://docs.expo.io/versions/latest/workflow/publishing/#limitations) that you'll need to create a new build in order to update the SDK version. Run `expo build:ios` and/or `expo build:android` when you are ready to do a new build for submission to stores.

Note: React Native 0.62 [introduced a new warning](https://github.com/facebook/react-native/issues/28558) when using the `Animated` API for animations. You’ll now need to specify `useNativeDriver:true` or `useNativeDriver:false` for all your Animated animations.

## Updating ExpoKit to SDK 38

- Follow the [instructions](https://docs.expo.io/versions/latest/expokit/expokit) given in the docs.
- **Please remember that SDK 38 will be the final update to ExpoKit.** To read more, including our recommendations for migrating, see [this blog post](https://blog.expo.io/time-to-start-using-expos-bare-workflow-expokit-now-deprecated-d6052890c18b).

---

🗣  If you have general questions or comments, please share them in our [community forums](http://forums.expo.io)! We also welcome [issue reports](http://github.com/expo/expo/issues) (and, of course, [PRs](http://github.com/expo/expo/pulls)) on Github.