Expo SDK v27.0.0 is now available
Expo SDK v27.0.0 is based on the recently released React Native 0.55 “March 2018”. The previous SDK release, v26.0.0, was based on React Native 0.54, “February 2018”.
Drop SDK 20, will drop SDK 21 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 20. As usual, your standalone apps built with SDK 20 will continue to work; however, SDK 20 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 20, preferably to SDK 27 so you won’t need to update again for a while (and also because each Expo version is better than the last!).
Support for bundled assets in ExpoKit
ExpoKit projects on iOS and Android which were created with exp detach
now support bundling your assets inside your native app archive so that your app can launch with no internet. We already supported this for standalone apps created with exp build
, but we’re excited to have support in both places now.
If you have an existing ExpoKit project you created before SDK 27, you’ll need to follow some manual instructions to add this support to your project. Check out the bottom of this blog post for details. (New ExpoKit projects will support this feature automatically.)
API improvements and additions
New MediaLibrary API
Adds advanced support for creating, reading, and moving media assets and albums on devices, beyond the standard React Native Camera Roll API. On iOS this uses the newer Photos framework. This is more performant and offers more detailed control and information compared to the Camera Roll API.
Read the documentation. Here’s an example.
New Haptic API
Provides haptic feedback for iOS 10+ devices which support the Taptic Engine. Check out this example.
Support for Firebase Cloud Messaging (FCM)
Google Cloud Messaging (GCM) and Firebase Cloud Messaging (FCM) are popular services used to send push notifications. Google recently announced they’re deprecating GCM, and recommended switching to FCM. Expo’s Android push notifications service currently relies on GCM; a full switch to FCM is in the works, but in the meantime, if you want more control, you can now use FCM with your own credentials in your standalone Android app.
We expect to move all Android push notifications over to this provider in the future. For now we’ll continue to support GCM, but strongly recommend that our users move to FCM as soon as possible.
Improvements to Linking API
We heard a lot of feedback about Expo’s deep linking API (including the strange usage of the +
character), so we changed how it works. This update resolves a number of issues and inconsistencies in Linking behavior, for example this, this, this, and this.
Documentation. Related commit.
Add Updates.reloadFromCache
Added Updates.reloadFromCache
method to reload the current experience using the most recent cached version. This is useful if you were listening for an update to finish downloading, and want to load the downloaded version at a specific time.
More ExpoKit Improvements
- ExpoKit for iOS now supports CocoaPods 1.5.0.
- Android ExpoKit apps now include a bundled copy of your app’s JS. (iOS already supported this.)
Assorted improvements to Audio/Video and ImageManipulator
- Fixed ImageManipulator to not include base64 when the
base64
flag is set tofalse
. Related issue. - Observe full screen player changes that are triggered by a UIKit button. Related issue.
- Fix a crash on iOS when using many video components simultaneously. Related issue.
- Fix latency on iOS when playing and pausing video. Related issue.
Assorted improvements to Expo GL
- Added PNG format to
takeSnapshotAsync
. Related issue. - Added headless rendering context for GLView. Example.
- Fall back to OpenGL ES 2.0 on devices (such as iPhone 5) that don’t support 3.0. Related commit.
Other fixes & improvements
- Major performance improvements to the Android Contacts Module. Thanks mg for the pull request!
- Fixed AuthSession bug on Android. Related issue.
- Fixed
Magnetometer.setUpdateInterval
on iOS. - Changed Geocoder to handle simultaneous requests on iOS. Also makes
Location.getCurrentPositionAsync
options optional. Related commit. - Fixed “Geocoder not running” error. Related issue.
- Changed the way we identify standalone app credentials to fix a case where an API could fail when the same app uses multiple bundle identifiers. Related issue.
- In Expo Client for iOS, prevent Segment and Google Analytics from discarding events due to missing
name
in the segment data field. This was not a problem in standalone apps and only affected Expo Client. Related issue.
Library updates
- Updated
react-native-fbads
to fix crash. Related issue. - Updated
react-native-maps
to 0.21.0.
Snack Improvements
- Who needs QR codes? 😉 You can now sign in, or enter your device ID in the Snack interface, and your projects will appear in the “Recently in Development” section of your projects tab in the Expo Client app.
- You can now search for example code directly from snack.expo.io, like so:
Breaking Changes
View.propTypes
has been removed from React Native, so if your code (or any of your dependent libraries) uses it, that will break. UseViewPropTypes
instead. We strongly recommend running your app with thedev
flag disabled to test whether it’s affected by this change.- We changed the format of
Constants.linkingUri
(see Linking changes above), so if your code makes assumptions about this, you should double check that. - Camera roll permissions are now required to use ImagePicker.launchCameraAsync() and ImagePicker.launchImageLibraryAsync(). You can ask for them by calling
Permissions.askAsync(Permissions.CAMERA_ROLL)
.
Upgrading Your App
Here’s how to upgrade your app to Expo SDK 27.0.0 from 26.0.0:
- Close XDE or your
exp
CLI server - In
app.json
, changesdkVersion
to"27.0.0"
- In
package.json
, change these dependencies:
-react-native
to"https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz"
-expo
to"^27.0.0"
-react
to ("16.3.1"
— this exact version)
-react-navigation
to"1.5.11"
(if you use it, and be sure to peruse the release notes)
-jest-expo
to"^27.0.0"
(if you use it)
-sentry-expo
did not change from"~1.7.0"
(if you use it) - Delete your project’s
node_modules
directory and runnpm 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 useexp
. - Update the Expo app on your phones from the App Store / Google Play. XDE and
exp
will automatically update your apps in simulators. - If you use ExpoKit: follow the special upgrade instructions below to get bundled assets when updating an existing ExpoKit project to to SDK 27.
- Make sure to check the breaking changes section of this post!
Updating ExpoKit to SDK 27
- Follow the usual instructions given in the docs. Additionally, if you’d like to add support for bundling your assets, follow these one-time instructions.