Expo SDK v28.0.0


Expo SDK v28.0.0 is based on React Native 0.55.4, the latest version at the time of writing. Our previous SDK release, v27.0.0, was based on 0.55.2.

Android targetSdkVersion updated to 26 and build tools updated to the latest version

Not to be confused with the Expo SDK version, the Android targetSdkVersionis described in the Android Developer Documentation as follows:

This attribute informs the system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app’s forward-compatibility with the target version. The application is still able to run on older versions (down to minSdkVersion).

This targetSdkVersion “will be required for new apps in August 2018, and for updates to existing apps in November 2018.” (Android Developers Blog.)

The following changes were made possible or necessary as a result of this change:

Support for Android notification channels

This is a breaking change: Android apps require notification channels for local and push notifications. Read full blog post and the Expo documentation on Notification Channels.

Support for Android adaptive launcher icons

Adaptive Icons in the Android Developer Guides

This is a breaking change: adaptive launcher icons are now configurable with the android.adaptiveIcon property in app.json. If you leave your icon as-is and run a new build of your app, it will be coerced into an adaptive icon. We suggest that you make a test build with exp build:android and see how your icon looks, then update it as necessary. Read full blog post.

GCM for Notifications on Android is deprecated

We’re deprecating GCM in favor of FCM. Google is turning off GCM next year and requiring FCM. Also FCM is much more reliable; GCM has begun unregistering devices very frequently. Read this guide to get your app set up on FCM.

Dropping SDK 21; will drop SDK 22 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 21. As usual, your standalone apps built with SDK 21 will continue to work; however, SDK 21 projects will no longer work within the latest version of Expo Client. If you want to re-run exp build, then you’ll need to upgrade from SDK 21, preferably to SDK 28 so you won’t need to update again for a while (and also because each Expo version is better than the last!).

API improvements and additions

Added StoreReview API on iOS

This exposes the SKStoreReviewController API, a favorite tool to encourage more reviews of your app on the App Store.

Related feature requests: 1, 2.
Read the documentation.

Updated react-native-gesture-handler to 1.0.4 and added react-native-reanimated

All of this without ever needing to call back into the JavaScript thread. See the source.

Major additions to Expo.AR (ARKit API)

Look at that shadow! And AR ruler! Try this example out at https://github.com/expo/three-ar-test

Expo.AR now exposes all API features of ARKit. Like ARKit itself, these are only available on iOS. Additionally, while Expo.AR is available within the Expo client, you will need to detach in order to use it on standalone apps.

Read the documentation.

Camera improvements

  • Optional onPictureSaved callback to takePictureAsync lets you asynchronously respond to saving a photo instead of blocking the UI. (Related issue.)
  • Add picture size param to let people opt in to low-quality, faster photos. (Helps with this issue.)
  • Added pause and resume preview methods. (Documentation.)
  • Fix Barcode scanning on various Android devices. (Related issues: 1, 2.)
We also updated our camera example app to have a more pleasant UI and to incorporate the newest features. Check it out at https://github.com/expo/camerja

Fixed issues with Print and promoted it out of DangerZone

Other fixes & improvements

  • Modal: Fixed all reported bugs reported when using the React Native built-in Modal component on iOS. (Related issue.)
  • DocumentPicker: Save files to readable directory. (Related issue.)
  • AV: Cookies fix for media player on Android. (Related issue.)
  • ImagePicker: Fix for saving pictures from Android camera intent. (Related issue.)
  • Video: Fixed delay with play/pause on iOS. (Related issue.)
  • Video: Fixed crashing with many video components. (Related issue.)
  • Video: Fixed video looping issues on Android. (Related issue.)
  • Notifications: Fixed issue with notifications sometimes being unintentionally dismissed on Android. (Related issue; related commit.)
  • Notifications: Fixed some issues with tapping notifications on Android. (Related issues: 1, 2.)
  • FileSystem: Made FileSystem work with asset bundling on Android. (Related commit.)
  • OTA updates on iOS: Fixed issues around choosing wrong bundle based on publish time. (Related issue.)
  • MediaLibrary: Fixed MediaLibrary.createAssetAsync. (Related thread.)
  • MediaLibrary: Added Expo.MediaLibrary.addListener(listener) to subscribe to insertion/deletion changes in the user’s media library. (Related commit.)
  • ExpoKit: Fixed bug with spaces in directories in ExpoKit. (Related issue.)
  • ExpoKit: Added hook to allow detached apps to modify OkHttpClient on Android. (Related commit.)

Library updates

  • Updated react-native-gesture-handler to 1.0.4.
  • Updated react-native-gesture-reanimated to 1.0.0-alpha.3.
  • Updated react-native-lottie to 0.21.0. (Related issue.)
  • Updated react-native-branch to 2.2.5 and fixed on Android.

Snack improvements

You can now import any git repository into snack; select “Import from git repository” in the project drop-down.
Easily embed snacks in medium articles or any of the services supported by Embedly
  • Added support for direct imports from react-native-gesture-handler, reanimated, and react-native-vector-icons — previously it was necessary to import react-native-gesture-handler with import { GestureHandler } from 'expo'; but now you can import it directly from the package.

Breaking Changes

  • As mentioned above, Android apps on all SDK versions now require notification channels for push notifications. This may impact you even if you don’t yet use SDK 28. Read this blog post for all of the necessary information.
  • As mentioned above, Android app icons are now coerced into adaptive icons. Be sure to test your app icon and supply an adaptive icon if needed. Read this blog post for all of the necessary information.
  • Print has been moved out of DangerZone; update your imports accordingly.

Upgrading Your App

Here’s how to upgrade your app to Expo SDK 28.0.0 from 27.0.0:

  • Close XDE or your exp CLI server
  • In app.json, change sdkVersion to "28.0.0"
  • In package.json, change these dependencies:
    - react-native to "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz"
    - expo to "^28.0.0"
    - react to ("16.3.1" — this exact version, it didn’t change from SDK 27)
    - react-navigation to "~2.3.1" (if you use it — this is also optional, you don’t have to update it to use the newest SDK. If you choose to, before you make this change make sure you read the release notes to update for breaking changes)
    - jest-expo to "^28.0.0" (if you use it)
    - sentry-expo to "~1.9.0" (if you use it)
  • Delete your project’s node_modules directory and run npm install again (or use Yarn, we love Yarn)
  • Reopen your project in XDE and press “Restart” to clear the packager cache, or run exp start -c if you use use exp.
  • Update the Expo app on your phones from the App Store / Google Play. XDE and exp will automatically update your apps in simulators.
  • Make sure to check the breaking changes section of this post!

Updating ExpoKit to SDK 28

Thanks toJess Hui.

Like what you read? Give Brent Vatne a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.

1.6K12





Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.