Expo SDK 42 adds custom dev clients preview and Stripe support
Expo has released SDK 42. It stays on React Native 0.63, the same version used in SDK 41.
Custom development clients
The headline addition is a preview of custom development clients. The expo-dev-client library, used together with EAS Build, lets managed Expo projects use native libraries that are not part of the Expo SDK, such as react-native-fast-image, react-native-blurhash, react-native-date-picker and @react-native-voice/voice. It installs an Expo Go-style interface into debug builds, and it works in any React Native app, not just Expo managed projects.
Config Plugins, introduced in SDK 41, have been adopted by packages including @stripe/stripe-react-native, react-native-nfc-manager, react-native-health and @react-native-voice/voice. Bluetooth and WebRTC support is available through @config-plugins/react-native-ble-plx and @config-plugins/react-native-webrtc. These work with custom dev clients, not in Expo Go.
Stripe, Hermes and notifications
- Expo worked with Stripe so that
@stripe/stripe-react-nativeworks in Expo projects;expo-payments-stripeis now deprecated in its favor, with a migration guide available. - Experimental Hermes support on Android is available in Expo Go, EAS Build apps and
expo-updates, but not in standalone apps built withexpo build. expo-notificationscan now handle push notifications while the app is in the background, and supports custom notification sounds in managed apps built with EAS Build.
EAS Build and tooling
Managed builds on EAS Build now include only the Android permissions required by libraries in use (plus a minimal set of default permissions), support splash screens for specific DPIs, sync capabilities with App Store Connect from entitlements, and match expo build default styles. The default Xcode version for EAS Build is now 12.5.
The Expo Tools extension for Visual Studio Code adds mod previews, which show live how config changes affect native files such as Info.plist or AndroidManifest.xml permissions without running expo prebuild, plus IntelliSense for icons, images and Config Plugins. Expo CLI also gains run commands for building and testing locally before sending work to EAS Build.
Breaking changes and deprecations
@react-native-community/masked-viewis now@react-native-masked-view/masked-view; either can be used for now.expo-permissionshas been removed fromreact-native-unimodules. Projects still using it should list it directly inpackage.json; projects that no longer use it must make sure it is not imported in the AndroidMainApplication.- SDK 38 is no longer supported in Expo Go. SDK 39 support is planned to end with the next release, expected in September/October 2021.
Upgrading
For both managed and bare projects, install the latest CLI with npm i -g expo-cli (expo-cli@4.7.2 or newer is required), update EAS CLI with npm i -g eas-cli if used, and run expo upgrade. Managed apps need updated Expo Go clients and new standalone builds via expo build:ios / expo build:android; bare apps should rebuild with npm run ios and npm run android. Check the changelog for other breaking changes.
Links
Source: web.archive.org