[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Sitemap
Exposition

Old articles by the Expo team and community. Visit us at https://expo.dev/blog to stay up to date with Expo news and product announcements. Subscribe to our newsletter at https://expo.dev/mailing-list/signup for more updates.

Follow publication

Expo SDK 46

--

Today we’re announcing the release of Expo SDK 46. SDK 46 includes React Native 0.69.5. Thank you to everyone who helped with beta testing.

Highlights

  • React Native Skia is now supported in Expo Go and on web. Skia is a high-performance 2D graphics library used by Chrome, among many other great tools, and React Native Skia provides an idiomatic React API for using Skia in your apps. This library raises the ceiling over what you can do in React Native — it’s truly a “game changer” for producing performant visual effects with React. React Native Skia is built by William Candillon and Christian Falch with support from Shopify.
Learn more about React Native Skia on William Candillon’s YouTube channel.
  • React Native FlashList is now supported in Expo Go and on web. FlashList is a drop-in replacement for FlatList, and it aims to solve performance limitations with respect to FPS and memory usage when using FlatList by recycling views, similar to how list primitives work in platform-native iOS and Android SDKs.
  • React Native 0.69.5 and React 18. The primary benefit of React Native 0.69 to JavaScript developers is that you can now use React 18 in your apps! While we’re excited about React Native’s New Architecture (alongside React 18 concurrent features), we can’t recommend it yet to any but the most adventurous developers: we don’t support it on Expo module view managers yet, and most libraries in the ecosystem don’t either.
  • React Native Web 0.18: breaking changes! Refer to the react-native-web@0.18 release notes to see a full list of breaking changes. We expect that these will impact many apps. For example, inline styles that require vendor prefixes to support older browsers (eg: <Component style={{ flex: 1 }} />) are no longer automatically vendor-prefixed. Switch to styles defined in StyleSheet.create instead.
  • This will be the final SDK with support for Classic Builds! SDK 47 will not support Classic Builds. This means that iOS 15 will be the last version that Classic Builds will target. If you want to target the iOS 16 SDK when it’s released, we suggest migrating to EAS Build sooner rather than later. See our original November 2021 announcement.

💡 Arriving shortly after the release

  • S̶u̶p̶p̶o̶r̶t̶ ̶f̶o̶r̶ ̶S̶D̶K̶ ̶4̶6̶ ̶o̶n̶ ̶t̶h̶e̶ ̶C̶l̶a̶s̶s̶i̶c̶ ̶b̶u̶i̶l̶d̶ ̶s̶e̶r̶v̶i̶c̶e̶ ̶(̶e̶x̶p̶o̶ ̶b̶u̶i̶l̶d̶:̶[̶i̶o̶s̶|̶a̶n̶d̶r̶o̶i̶d̶]̶)̶ ̶w̶i̶l̶l̶ ̶b̶e̶ ̶r̶e̶a̶d̶y̶ ̶a̶b̶o̶u̶t̶ ̶t̶w̶o̶ ̶w̶e̶e̶k̶s̶ ̶f̶r̶o̶m̶ ̶t̶h̶e̶ ̶d̶a̶t̶e̶ ̶o̶f̶ ̶t̶h̶i̶s̶ ̶r̶e̶l̶e̶a̶s̶e̶.̶ ̶S̶D̶K̶ ̶4̶6̶ ̶i̶s̶ ̶t̶h̶e̶ ̶f̶i̶n̶a̶l̶ ̶r̶e̶l̶e̶a̶s̶e̶ ̶t̶o̶ ̶s̶u̶p̶p̶o̶r̶t̶ ̶t̶h̶e̶ ̶c̶l̶a̶s̶s̶i̶c̶ ̶b̶u̶i̶l̶d̶ ̶s̶e̶r̶v̶i̶c̶e̶,̶ ̶s̶o̶ ̶w̶e̶ ̶w̶o̶u̶l̶d̶ ̶e̶n̶c̶o̶u̶r̶a̶g̶e̶ ̶s̶w̶i̶t̶c̶h̶i̶n̶g̶ ̶t̶o̶ ̶E̶A̶S̶ ̶B̶u̶i̶l̶d̶ ̶n̶o̶w̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶w̶a̶i̶t̶i̶n̶g̶!̶ Classic build support (expo build:[ios|android]) is available for SDK 46 as of Friday, August 19th. As mentioned elsewhere in these notes, this last version of the Expo SDK that will support Classic Builds! You should migrate to EAS Build soon to ensure that you are able to continue submitting your app as App Store version requirements change in the future.

💬 vscode-expo now supports all Expo configs

Up until recently, vscode-expo’s primary purpose was to provide autocomplete and validation of your app.json or app.config.json files.

With the latest release, it can now provide the same autocomplete and validation for eas.json (EAS Build and Submit), store.config.json (EAS Metadata), and expo-module.config.json (Expo modules).

IntelliSense in eas.json. Notice that all information from the schema is available directly in your editor— supported keys, values, and descriptions. It will be hard to go back to looking up properties in documentation after you have them all available through IntelliSense in Visual Studio Code.

You can learn more about the latest changes in this Twitter thread, and install the extension from the Visual Studio Marketplace or Open VSX.

⌨️ Expo CLI

We’ve completely rewritten the Expo CLI from the ground up to create a faster, and more streamlined experience. You no longer need to install expo-cli globally, everything lives locally in your project folder! This means running your project in CI will be faster and easier, projects will be backwards compatible for longer, and there are no more frequent CLI updates.

This was accomplished by moving the smaller commands into standalone packages like the all-new create-expo-app, and moving commands that interact with Expo servers and EAS services into their own package, eas-cli.

create-expo-app defaults to creating a project from the Blank template. If you pass in the --template flag you will be given the same template prompt as in the now legacy expo-cli init.

The new CLI also comes with quality of life improvements, such as PNPM support across the suite of tools and improved expo install with a new --fix flag to auto install the correct dependency versions.

We have big plans to improve the platform in the next year, and moving to the local, versioned system was the biggest step.

  • To use the new local CLI: run npx expo or yarn expo in your project directory, eg: npx expo start. The local CLI will automatically be invoked by scripts in your package.json, but otherwise you need to prefix it with npx.
    - If you run expo start in your project, the global CLI will be used.
    - If you run npx expo start, the local CLI will be used.
    - If you run npm start to invoke {"scripts": {"start": "expo start"}} then it will invoke the local CLI.
    This is because both npx and scripts in package.json resolve the binary through your project node_modules first.
  • To explicitly invoke the legacy globally installed CLI: use expo-cli instead of expo, eg: expo-cli publish.
  • To temporarily opt-out of the local CLI: set the environment variable EXPO_USE_LOCAL_CLI to 0.
  • If you haven’t migrated from Classic Updates to EAS Update yet: you will need to continue to invoke the publish command with the global CLI: expo-cli publish.
  • Global Expo CLI is still required for expo upgrade and expo doctor: these commands haven’t yet been migrated to standalone packages, they are up next. Invoke them with expo-cli upgrade and expo-cli doctor.
  • Refer to the migration guide for detailed information on how every command maps over to their new CLIs.

👩‍💻 Development Builds

expo-dev-client has hit version 1.0.0 — we now consider it stable and out of preview! Read our announcement post to learn more about how Development Builds can help your project. This release also ships with a number of improvements:

  • Added a new API to add custom extensions to the development menu from your app JavaScript code.
  • Added an API to detect if your app is running inside a Development Build, allowing you to fork behavior to talk to a different server (eg: local server rather than production), expose some internal functionality, or whatever else you might need.
  • Improved UX for EAS Update integration to make it easier to jump quickly between different updates.

📲 EAS Update

EAS Update is the next generation of Expo’s update service. It is faster, easier to use, and more flexible. Soon it will be available to all accounts.

If you’re currently an EAS customer, you can migrate from our Classic Updates service to EAS Update today. To migrate, follow the migration guide in the docs. To get the most out of EAS Update and all of its features, like new web UIs and deployment patterns, check out the docs.

🏗 Deprecations, renamings, and removals

  • Libraries that were deprecated in SDK 45 have now been removed. The following libraries are no longer available in Expo Go or in Classic Builds: expo-ads-admob, expo-analytics-amplitude, expo-ads-facebook, expo-facebook, expo-google-sign-in, and expo-segment. See the SDK 45 documentation for each library (linked from their names above) for more information about how to migrate away.
  • The Web UI for Expo CLI has been removed in expo-cli@6.0.0. It is also not available in the new, local CLI. Learn in “Sunsetting the Web UI for Expo CLI”.
  • expo-error-recovery has been deprecated and will be removed in SDK 47. The error recovery module was used exclusively for working within the constraints of the classic build system which is no longer required now that EAS Build exists. Learn more.
  • Removed several default dependencies in blank template.react-native-web, react-dom, and @expo/webpack-config need to be installed in new projects to run on web. These were removed in order to reduce the template install size, and we provide instructions on how to install them when you attempt to launch web.
Copy and paste the install command provided in the warning when you attempt to launch web in a new project in order to install the required dependencies.

🧹 Dropped SDK 43; will drop SDK 44 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 43. As usual, your standalone apps built with SDK 43 will continue to work; however, SDK 43 projects will no longer work within the latest version of Expo Go. They will continue to work with EAS Build and expo-dev-client.

Our next release will drop support for SDK 44. If your project is running on this release, consider upgrading to a newer version soon.

🍎 iOS 12.4 is now the minimum supported version, iOS 12 support will be dropped in SDK 47

Along with the upgrade to React Native 0.69, Expo projects support iOS 12.4 and greater. As announced in SDK 45, SDK 47 will be released in the fall with support for iOS 16. We will drop support for iOS 12 entirely in the Expo SDK when we add support for iOS 16.

🕰 Five months left to migrate from Classic Builds (expo build:android, expo build:ios)

Last November we announced that 2022 is the final year the Classic Build service will be available. If you use expo build:android or expo build:ios, you will need to use eas build or build on your own hardware by the end of this year.

SDK 46 is the last SDK version supported by Classic Builds. You’ll be able to use expo build to build apps that use SDK 46 and earlier, but not apps that use SDK 47 and beyond. SDK 47 will also be the first release that targets iOS 16 this fall and depending on App Store requirements, may be required for new iOS app submissions, so be sure to plan ahead.

➡️ Upgrading your app

Managed workflow

Here’s how to upgrade your app to Expo SDK 46 from 45:

  • Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli@6.0.0 or greater is recommended.
  • Update to the latest version of EAS CLI if you use it: npm i -g eas-cli.
  • Run expo-cli upgrade in your project directory. Run expo-cli doctor afterwards to check for any possibly issues in your project dependencies.
  • 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!
  • If you use Expo Go: Update the Expo Go app on your phones from the App Store / Google Play. Expo CLI will automatically update your apps in simulators. You can also download the iOS simulator build or the APK from expo.dev/tools.
  • If you use expo-dev-client: Create a new build of your development app after upgrading.
  • Use the new CLI: Run your project with npx expo start or yarn expo start.
  • 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 --clear-cache and/or eas build -p android when you are ready to do a new build for submission to stores.
  • Questions? We’ll be hosting some office hours focused on upgrading to SDK46. Keep an eye out on Discord for more info / sign-ups.

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 46 from 45:

  • Ensure you are using Xcode 13.3 or greater if you support iOS.
  • Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli@6.0.0 or greater is recommended.
  • Update to the latest version of EAS CLI if you use it: npm i -g eas-cli.
  • Run expo-cli upgrade in your project directory.
  • Apply any relevant changes from the React Native Upgrade Helper.
  • If you use expo-dev-client: Create a new build of your development app after upgrading.
  • Use the new CLI: Run your project with npx expo run:[ios|android] or yarn expo run:[ios|android].
  • 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 and/or eas build if you use it (it works great with any React Native app!)

Thanks to everyone who contributed to the release!

The team: everyone contributed one way or another, with special mentions to the engineers most directly involved in this release: Kudo Chien and Tomasz Sapeta for leading SDK work, Wojciech Kozyra for his invaluable support during versioning, Bartłomiej (Brick) Klocek the improvements he made on various modules in this cycle, Bartłomiej Bukowski for his contributions to this release and to many others throughout the years (we’ll miss you!), Evan Bacon and Cedric van Putten for shipping the local CLI and Visual Studio Code extension improvements, Łukasz Kosmaty, Eric Samelson, and Andrew Smith for their work on expo-dev-client, Bartosz (Simek) Kaszubowski for his attention to detail on documentation, Juwan Wheatley for his work on Expo Go, Kim Brandwijk and Kelley Sharp for supporting the community, and Chris Walter and Doug Lowder for shipping their first commits.

External contributors: Alberto, Alexis Lefebvre, Aman Mittal, Brad Jones, Broda Noel, Chris, Chris Bobbe, Dan Stepanov, Daniel Molnar, Gustavo Graña, Hirbod, Lucas Alves, Michael Nightingale, Michael Wood, Sascha Reuter, Simen Bekkhus, Steve Austin, Tarun Chauhan, Tyler Callison, Tyler Sheaffer, Umut Topuzoğlu, Victor Rothberg Gimael, William Théroux, Yaman KATBY, Yuri Gabriel Ferreira Lisboa, Zhigang Fang, Zhu Liang, apeltop, kota marusue, liamronancb, madhums, and xkcdstickfigure.

Beta testers: Stephen White, RedPandaTronics, danielantelo, Asharam Seervi, Timothy Shamilov, Jonathan Dahan, Rami Elwan, Axel Delafosse
Chee Kit, and many of the same folks listed above.

Thank you for reading — we hope you enjoy this release!

--

--

Exposition
Exposition

Published in Exposition

Old articles by the Expo team and community. Visit us at https://expo.dev/blog to stay up to date with Expo news and product announcements. Subscribe to our newsletter at https://expo.dev/mailing-list/signup for more updates.

Responses (7)