Expo SDK 44

Brent Vatne
Exposition
Published in
9 min readDec 17, 2021

--

Today we’re announcing the release of Expo SDK 44. SDK 44 includes React Native 0.64.3. Thank you to everyone who helped with beta testing. (Curious why we didn’t include React Native 0.65 (August) or 0.66 (October)? Learn more.)

⚡️ Highlights

  • Integrated expo-system-ui and expo-navigation-bar in Expo Go: these APIs were introduced during this cycle to support userInterfaceStyle locking on EAS Build, enable modifying the root view background color at runtime, and enable controlling the Android navigation bar configuration at runtime. They were initially supported only in bare workflow or standalone apps built with EAS Build, but with the release of SDK 44 are also available in Expo Go. Documentation: expo-navigation-bar, expo-system-ui.
Updating the root background color (left) and Android navigation bar (right) at runtime
  • Removed most remaining default dependencies from managed projects: due to configuration requirements that have now been solved through Expo module infrastructure upgrades and other improvements to the libraries themselves, we no longer install the following dependencies by default in managed projects built on EAS Build: expo-updates, react-native-reanimated, react-native-gesture-handler, react-native-screens, and react-native-safe-area-context. Most projects will use these dependencies, but it can be useful in some cases, for example if you want to use realm (which is currently not compatible with react-native-reanimated) or remove expo-updates to opt-out of updates. The only remaining dependency that will be installed in all projects is expo-splash-screen. More documentation to come on the Expo infrastructure improvements that enabled this change.
  • Updated Software Mansion library suite: react-native-reanimated@2.3.1 with support for layout animations, react-native-gesture-handler@2.1 with the new gesture API, and react-native-screens@3.10 with react-freeze integration.
  • Assorted popular “bug fixes and improvements”: expo-blur, expo-barcode-scanner, expo-face-detector, expo-firebase-*, and more! Learn the details in the changelog.
  • React 17 JSX transform now enabled by default: this means that you don’t need to write import React from 'react'; at the top of every source file that uses JSX. Learn more about the transform and how you can disable it, if you prefer.
  • To see the full list of new features and fixes, refer to the changelog!

💡 Arriving shortly after the release

  • Snack support for SDK 44 will be available in the next few days.
  • Documentation for creating Expo modules is in progress and expected to land before the new year.

⌨️ Expo CLI

The following improvements are available in expo-cli@5.0.2 and higher:

  • Improved monorepo support. expo init bootstraps projects with the name and version field. expo prebuild uses Expo Autolinking for auto config plugins. The default expo/metro-config now has partial support for Yarn workspaces built-in.
  • Improved Xcode logging in expo run:ios all native files are now attributed to a linked node module. Hermes warnings now have built-in support and show a much more helpful snippet.
  • Added the new expo run:ios --no-build-cache flag for cleaning the build folder before rebuilding (⌥⇧⌘K in Xcode).

Managed EAS Build now supports the following app.json features:

The following commands have been moved or deprecated:

  • expo build:ios expo build:android & expo build:status have been superseded by eas build but will remain available in Expo CLI until 2024.
  • expo upload:android & expo upload:ios have been superseded by eas submit and are no longer available in Expo CLI.
  • expo client:ios has been deprecated in favor of development builds.

👩‍💻 Development Builds

The 0.8.0 release of expo-dev-client comes with a number of advances, including:

  • a fresh new look
  • improved error handling
  • support for React Native 0.66 (if the rest of your project is able to use 0.66)

Read the release announcement to learn more.

📲 EAS Update is going into preview

Earlier this year, we released EAS Build and EAS Submit. With these services, you can build and submit a store-ready app, but the development story does not end there. Now, it’s time to iterate.

EAS Update is EAS’ next-generation updates service. With it, you’ll be able to:

  • Deploy continuously. Use new and more flexible deployment patterns, that work with your git flow seamlessly.
  • Deliver updates faster. EAS Update uses the latest compression standards, including Brotli compression.
  • Rollback. Undo mistakes by re-publishing known good updates.
  • Debug with ease. New and improved CLI outputs make it easier to see everything related to updates.

EAS Update is currently in preview and is available for Production and Enterprise subscribers. Read the announcement post and get started with the EAS Update docs.

👷‍♀️ EAS Build and Submit

We have made tons of improvements to EAS Build and Submit over the most recent SDK cycle; here are a few of the new features that you might have missed:

  • General availability! In “Introducing EAS” blog post we announced that EAS Build and Submit have been moved out of preview and into general availability. They are now available for use on the Free plan, with additional benefits available under the Production and Enterprise plans.
  • App Store Connect (ASC) API key support for Submissions. Previously it was necessary to manually generate and provide an Apple App Specific Password to submit your iOS app through EAS Submit; but with the ASC API key we can generate and store it for you, so it’s easy to submit in CI or to share with your team.
  • Introduced a keytool service. When running a build for a new Android project, it’s necessary to provide a keystore for app signing. If the developer has the JDK installed on their machine, we can use keytool to generate this. If they do not, then previously we used to require that they install it. We found that this was often problematic for users on Windows, and so we built a hosted keytool service which we use as a fallback if it is not installed on the develeper’s local machine.
  • New command to inspect build files. eas build:inspect makes it easier to debug at various stages (archive, pre-build, and post-build). For example, if you want to know exactly what files are being uploaded you can run eas build:inspect -p android -s archive --output ~/debug-archive and then explore the ~/debug-archive directory.

🏗 Deprecations, renamings, and removals

react-native-gesture-handler now requires a GestureHandlerRootView wrapper. As of v2, you now need to wrap your app with a <GestureHandlerRootView style={{ flex: 1 }}> component, as described in the related installation documentation.

jest-expo no longer depends directly on jest.
If you use jest-expo you will need to run expo install jest after upgrading in order to install the recommend version of jest in your project. If you use jest without jest-expo, you will notice that the version will be changed when you run expo upgrade. Feel free to revert back to whichever version you prefer to use.

expo-app-auth and expo-google-app-auth are deprecated, use expo-auth-session instead.
The expo-auth-session library was designed to be a replacement for expo-app-auth, but built on top of existing primitives in the Expo SDK, like expo-web-browser and expo-random, rather than as a wrapper for the AppAuth-iOS and AppAuth-Android native libraries. We now recommend using expo-auth-session instead, and so we are deprecating expo-app-auth. If you would like to continue using the AppAuth-iOS and AppAuth-Android native libraries, you may use react-native-app-auth instead.

expo-google-sign-in is deprecated, use expo-auth-session or @react-native-google-signin/google-signin instead.

See all deprecations and breaking changes in the changelog.

🧹 Dropped SDK 40; will drop SDK 41 and 42 next release

We routinely drop SDK versions that have low usage in order to reduce the number of versions we need to support. This release sees the end of life for SDK 40. As usual, your standalone apps built with SDK 40 will continue to work; however, SDK 40 projects will no longer work within the latest version of Expo Go. If you want to re-run expo build, then you’ll need to upgrade from SDK 40, preferably to SDK 44 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 will drop support for SDK 41 and SDK 42. If your project is running on either of those releases, consider upgrading to a newer version soon.

➡️ Upgrading your app

Managed workflow

Here’s how to upgrade your app to Expo SDK 44 from 43:

  • Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli@5.0.2 or greater is required.
  • Update to the latest version of EAS CLI if you use it: npm i -g eas-cli.
  • Run expo upgrade in your project directory.
  • Remove react-native-unimodules, @unimodules/core, and @unimodules/react-native-adapter if you have any of them installed in your project. You may also want to check (eg: with yarn why @unimodules/core) to see if any of your dependencies install these libraries transitively, and upgrade or remove those dependencies. Learn more.
  • Refer to the “Deprecations, renamings, and removals” section above for breaking changes that are most likely to impact your app.
  • Make sure to check the changelog for all other breaking changes!
  • Update the Expo Go 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.
  • You may need to update custom config plugins in your project to match the AppDelegate.m changes.
  • If you built a standalone app previously, remember that you’ll need to create a new build in order to update the SDK version. Run eas build -p ios and/or eas build -p android when you are ready to do a new build for submission to stores.

Bare workflow

The bare workflow lets you operate independently of the Expo SDK cycle, updating React Native versions and versions of individual Expo packages whenever you want. However, if you do stick roughly to Expo SDK versions, these steps will help you to upgrade to Expo SDK 44 from 43:

  • Update to Xcode 13 if you support iOS.
  • Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli@5.0.2 or greater is required.
  • Update to the latest version of EAS CLI if you use it: npm i -g eas-cli.
  • Run expo upgrade in your project directory.
  • Remove react-native-unimodules, @unimodules/core, and @unimodules/react-native-adapter if you have any of them installed in your project. You may also want to check (eg: with yarn why @unimodules/core) to see if any of your dependencies install these libraries transitively, and upgrade or remove those dependencies. Learn more.
  • Update your AppDelegate.m according to this diff or run npx install-expo-modules to migrate automatically.
  • Refer to the “Deprecations, renamings, and removals” section above for breaking changes that are most likely to impact your app.
  • Make sure to check the changelog for other breaking changes!
  • Rebuild your native projects with npm run ios and npm run android.

Thanks for beta testing SDK 44

Thank you to the people who tried out the SDK 44 beta, including: ajacquierbret, CodingItWrong, giautm, Hirbod, ishikawa, islamouzou, Lapz, and nandorojo. Several of these people helped find issues we could fix before this release.

Thank you for reading, we hope that you enjoy this new release!

--

--