Expo SDK 43

Brent Vatne
Exposition
Published in
8 min readOct 21, 2021

--

Today we’re announcing the release of Expo SDK 43. SDK 43 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.)

Note: this post was updated on November 9th, 2021 to indicate that the React Native version has been bumped from 0.64.2 to 0.64.3.

⚡️ Highlights

This gif (pronounced with a hard g) shows one of the many improvements Expo modules brings over Unimodules — your AppDelegate is now much cleaner!
  • Introducing npx install-expo-modules to make it easier than ever to bring Expo modules to any React Native app. Learn more in “Installing Expo modules”.
  • React Native 0.64.3 and React 17 included. It’s important for a React Native release to be stable and widely supported by libraries in the ecosystem before we recommend it to Expo users. After staying on React Native 0.63 for several releases, we have pulled in React Native 0.64.3 for Expo SDK 43. React 17 adds support for the automatic JSX runtime, learn how to enable it with babel-preset-expo.
  • No more react-native fork in Expo managed apps. In SDK 42 and lower, your package.json includes something like: “react-native”: “https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz". In SDK 43 and higher, it’s just this: “react-native”: “0.64.3”.
  • You can now press r to reload your app in Expo Go. Xcode 12 introduced the ⌘+r simulator shortcut for “Record Screen”, and so to avoid clashing with that shortcut you can now reload by just pressing r (as long as a text input is not focused). ⌘+r will also continue to work.
  • To see the full list of new features and fixes, refer to the changelog!

⌨️ Expo CLI

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

  • Experimental “Exotic” transformer. This new transformer improves cold JavaScript build times by approximately 2x and decreases the final bundle size by up to 18%. Learn more and try it out.
  • Support for Fig autocomplete. Fig provides “VSCode-style autocomplete” for your terminal and now supports Expo CLI.
Autocomplete for commands and flags. Learn more at https://fig.io/
  • More compact QR code. If you haven’t updated Expo CLI in a while, you’ll be pleasantly surprised to find that the QR code on expo start is now about half the size it was before. It’s a small thing (no pun intended), but it’s a nice improvement.
New smaller QR codes make it easier to connect to projects running in smaller terminals

🏁 Beta Flags

You can try experimental Expo CLI features today by enabling the following environment variables:

EXPO_USE_CORE_SIM — A rewrite of the third party tool simctl that makes interacting with iOS Simulators faster. Open apps on simulators, list and boot simulators up to 7x faster (expo start -i). See the related Pull Request. Note that this feature has a known issue when using for the first time after upgrading Xcode (e.g. iOS 14 to iOS 15).

EXPO_USE_APPLE_DEVICE — A rewrite of third party tools ios-deploy and xctrace to make the following improvements:

  • Find connected iOS devices 40x faster (expo run:ios -d).
  • Support iOS devices with emojis and other complex characters in their name.
  • Install apps on iOS devices up to 2.5x faster (expo run:ios -d), making it faster than Xcode in most cases.
  • No need to globally install ios-deploy, all code is now self contained.
  • Future support for streaming connected device logs for improved debugging.

EXPO_USE_EXOTIC — A new Metro transformer for improved speed, and smaller bundles and source maps. Read the documentation and the announcement article.

👷‍♀️ 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:

  • Added eas build --auto-submit to automatically schedule a submission for when the build completes. In order to make this possible, we also added hosting for submission credentials and we created submission profiles in eas.json. Learn more about EAS Submit.
  • Added --json flag to build commands. This makes it easier to automate EAS CLI with tools like jq, for example: eas build:list --json | jq '.[0].artifacts.buildUrl' will return the build artifact URL for the most recent build.
  • Added autoIncrement to Android. You can configure it on your build profile to increment your Android app version or versionCode on build. Learn more.
  • Improved private npm package ergonomics. We will now automatically create a .npmrc configured to consume private packages from the npm registry if you create a NPM_TOKEN secret. If you want to consume private packages from outside of the npm registry, you can create your own .npmrc in your project. Learn more in “Using private npm packages”.

📱Development Clients

  • Support for loading published updates created with expo publish. Learn more in “Javascript driven development with custom runtimes”
  • Improved onboarding experience. It’s now easier than ever to customize your project: we’ve addressed many small issues that collectively prevented some developers from using custom development clients successfully.
  • Compatibility with react-native 0.64 and 0.65. If the newer releases are stable enough for your project, you can update knowing that expo-dev-client will continue to work great.

🌐 expo.dev and docs.expo.dev

  • expo.io is now expo.dev. In case you missed it, we moved from expo.io to expo.dev during the SDK 43 cycle.
  • Faster website (2x faster on most pages), new onboarding flow and new dashboard activity feed.
  • Starting to roll out native permissions tables and config plugin API reference to SDK documentation. As EAS Build becomes more popular and we move towards general availability, we’re starting to transition our API documentation to cover config plugins for each module.
The ImagePicker API reference is one of the first pages to get these new sections. You should expect to see them spread to the rest of the SDK 43 docs over the coming weeks.

🏗 Deprecations, renamings, and removals

react-native-unimodules has been deprecated, useexpo instead.
If you use the managed workflow, this does not impact you. If you are using Expo modules and managing your own iOS and Android projects, you should switch from react-native-unimodules to expo. Learn more about why we are making this change in “What’s new in Expo modules infrastructure” and learn how to migrate in “Migrating to Expo modules”.

expo-payments-stripe has been fully removed.
This package was deprecated in SDK 42, replaced by the @stripe/stripe-react-native package. If you would like to continue developing with the expo-payments-stripe library, which is not recommended, you will need to remain on SDK 42 or below, and use an older version of Expo Go (installable via expo client:install:android).

react-native-appearance has been fully removed.
This package was deprecated in SDK 41, replaced by useColorScheme from React Native core.

iOS 15 is fully supported; iOS 11 support has been dropped.
With the release of iOS 15, we have dropped support for iOS 11 in the Expo SDK. SDK 43 supports iOS 12 and higher.

iOS 15 removed all “Courier” font variants except “Courier New”.
If you use these font families in your app, you will either need to ship the font assets with your app or switch to another font family.

🧹 Dropped SDK 39; will drop SDK 40 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 39. As usual, your standalone apps built with SDK 39 will continue to work; however, SDK 39 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 39, preferably to SDK 43 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 December 2021 and, at that time, we’ll be dropping support for SDK 40. If your project is running on SDK 40, consider upgrading to a newer version soon.

➡️ Upgrading your app

Managed workflow

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

  • Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli@4.12.8 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.
  • 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.
  • 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 expo build:ios and/or expo build: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 43 from 42:

  • Update to Xcode 13 if you support iOS.
  • Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli@4.12.8 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.
  • Follow the “Migrating to Expo modules” guide.
  • 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 43

Thank you to the people who tried out the SDK 43 beta including: satya164, awinograd, thomas-coldwell, hannojg, hudzenko, baxidev, schematis, islamouzou, eliachiarucci, MateWW, Qwin, TMcLoone, dqii, pheuter, Hirbod, max-frai, colinux, Albert-Gao, thedoublejay, haibert, wardjk87, ikosakwe, JJK801, and xD3CODER. 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!

--

--