DEV Community

Charlie Cruzan for Expo

Posted on

Time to Start Using Expo's Bare Workflow. ExpoKit is Now Deprecated.

One of the benefits of developing with Expo is that you can write in pure JavaScript and never "drop down" to the native iOS or Android layer. While we're always expanding the Expo SDK, there are some cases where certain projects need native capabilities outside what Expo offers out-of-the-box. Historically, we've tried to address this with ExpoKit, a native library released alongside each Expo SDK version to provide a path to adding custom native modules to an existing Expo app. However, it became increasingly clear that we want an end-to-end experience around customizing your Expo app with native code. 

The Bare workflow

We introduced the Bare workflow in 2019 to give developers complete control, along with the complexity that comes with that. It's basically the same experience as creating a project with the React Native CLI. With the Bare workflow, you can customize your Expo app with any native library or your own native code - while still using most APIs in the Expo SDK, including (as of today) Over-the-Air Updates and Notifications. 

Now that Expo OTA Updates and Notifications can be used in the Bare workflow, and it's battle-tested and mature, the Bare workflow is a better solution than ExpoKit in every way, and is ready to fully replace it. So, we're deprecating ExpoKit with our SDK 37.0.0 release. Our last ExpoKit update will be with SDK 38.0.0, after which we'll focus solely on supporting and improving the Bare and Managed workflows. So, don't use ExpoKit for any projects; use the Bare workflow instead. And when you have the time, migrate your existing projects that use ExpoKit to the Bare workflow. Your experience in the Bare workflow will be better, easier to maintain, and allow you to make any modification to your application that you want.

New modules for the Bare workflow

Alongside SDK 37.0.0, we're introducing support for over-the-air (OTA) updates, SpashScreen customization, background tasks, and push notifications in the Bare workflow:

  • expo-updates provides a client-side implementation for loading over-the-air (OTA) updates in Bare workflow apps. Updates allow you to deploy new JavaScript and assets to existing builds of your app without building a new binary. Read more in our documentation.
  • expo-splash-screen allows you to customize your app's splash screen, which is the initial screen users see when the app has launched but hasn't loaded. Splash screens (sometimes called launch screens) provide a user's first experience with your application. Read more here.
  • expo-notifications provides an API to fetch push notification tokens and to present, schedule, receive and respond to notifications. Read more in our documentation.
  • expo-task-manager lets you manage long-running tasks, in particular those tasks that can run while your app is in the background. Some features of this module are used by other modules under the hood, including Location and BackgroundFetch. Read more in our documentation.

Migrating from ExpoKit to Bare 

For current ExpoKit users, we believe that while migration will be fairly tedious, moving to the Bare workflow is worth it. To ease the transition, we've outlined our recommended approach to migration, and will still release ExpoKit for SDK37 and SDK38. (After SDK38, your ExpoKit apps in the App Store and Play Store will continue to run indefinitely, but to get bug fixes and new features in Expo modules, you'll need to move to either the Bare or Managed workflow.)

  1. Move your app back to the Managed workflow and get it running.  First, backup any credentials (i.e. keystores) you may have stored in your iOS and Android directories to a separate folder. Then, delete those iOS and Android directories, and remove any fields from app.json that apply to ExpoKit. Finally, comment out any code in your app that depends on custom native modules.
  2. Make sure your app.json is up to date with your iOS bundleIdentifier and Android package, along with any other configuration it accepts that's relevant to your app (see the whole list of configuration options here).
  3. Commit your code now that it's running in the Managed workflow, including the configuration in app.json.
  4. Run expo eject and follow the prompts to get your app running again. Add any native code back to your app one piece at a time.

Top comments (0)