How to Upgrade Your App to Expo SDK 58: iOS 27 Scene Life Cycle, React Native 0.88 and the Breaking Changes…

2026-12-01来源 dev.toEnglish

Expo SDK 58 landed on October 15, 2026, and it is not a routine bump. It is built for iOS 27, which requires Apple's scene-based UIKit life cycle, it moves React Native from 0.86 to 0.88, and it changes several defaults that quietly alter how an existing app behaves: the NODE_ENV that your .env files load under, whether Android release builds are minified, whether Expo Router renders HTML on the server, and what happens when a foreground notification arrives. If you maintain an Expo app, the upgrade itself takes a handful of commands. The part that deserves your attention is the list of things that can break afterwards, and that is what this guide walks through.

The advice below follows Expo's own SDK 58 changelog, which is the source for every version number, flag and command mentioned here. Where the changelog describes behavior, this guide explains what it means in practice and in what order to check it. Where something is still an alpha or beta package, such as expo-app-intents or Expo Modules 2.0, it is labeled that way, because adopting those on a production app is a separate decision from upgrading the SDK.

What is new in SDK 58, and who needs to upgrade

The headline is iOS 27 readiness. Apps built with the iOS 27 SDK automatically get the scene-based life cycle and become resizable on iPhone. Expo's own apps already use the scene life cycle, and prebuild now generates a SceneDelegate.swift file together with a UIApplicationSceneManifest entry in Info.plist, with the window created by the scene delegate rather than inside didFinishLaunchingWithOptions. For apps that use Continuous Native Generation, which is to say apps where the ios and android folders are generated and not committed, this happens for you. For apps that hand-edit AppDelegate.swift or keep the ios directory under version control, it is a migration you must read about before building.

SDK 58 also prepares apps for iPhone Duo, the foldable device that Apple has been taking pre-orders for. On that device iOS moves most bars and controls to a vertical rail on one edge, and your window size changes as the device is folded or placed in split view. Expo's advice is to lean on system navigation, meaning Expo Router's Stack and NativeTabs or SwiftUI views hosted through Expo UI, and to revisit safe-area handling because horizontal insets matter more than they used to. A new expo-hinge package exposes the hinge angle through useHinge(), getHinge() and addHingeListener() on iOS 27.1 and later and on Android 11 foldables.

Beyond that, the release stabilizes Expo Router's data loaders, server rendering, middleware, native tabs and toolbars, adds Android home screen widgets to expo-widgets, ships precompiled expo-modules-core libraries that roughly halve a clean Android debug build in Expo's own measurement, and bumps Node.js requirements. Anyone building for iOS needs to treat this as a required upgrade as soon as they adopt Xcode 27. Teams that are not yet building against the iOS 27 SDK have more freedom on timing, but the Expo Go app in the stores will move to SDK 58 only, so anyone who relies on Expo Go will eventually be pulled along.

Requirements and compatibility

Before you touch package.json, check your toolchain. SDK 58 tooling requires Node.js 22.13 or newer on the 22 line, 24.3 or newer on the 24 line, or Node.js 26 and later. Odd-numbered releases such as Node 23 and Node 25 are not supported. If your CI image or your colleagues' laptops are on Node 20 or on an older 22.x, fix that first, because the failure modes when Node is too old tend to be confusing install errors rather than a clean message.

On Android, Expo's module tooling is now compatible with Android Gradle Plugin 9, and @expo/ui and the module template use Compose UI and Foundation 1.12.1 and Material 3 1.5.0-beta01. Expo states that there are no breaking changes from the Compose bump, only some renamed props that still work under their old names. On iOS, you need Xcode 27 to build with the iOS 27 SDK and to use Device Hub, which replaces Simulator.app. macOS targets are not supported in SDK 58, with support expected to return once react-native-macos reaches at least React Native 0.86.

One timing detail matters for people who test on a physical phone. Expo Go for SDK 58 was not yet in the App Store or Google Play when the changelog was published, and Expo said it would arrive within a few weeks. Until then, npx create-expo-app still creates SDK 57 projects, and anyone who wants a new SDK 58 project should run the template command shown later in this guide and use a development build. Once the new Expo Go ships, it will support only SDK 58, which is another reason older projects will need to move.

A compact summary of the toolchain, as stated in the changelog:

Component SDK 58 requirement or change
Node.js 22.13+ (22 line), 24.3+ (24 line), or 26 and later; odd releases unsupported
React Native 0.88 (from 0.86)
iOS toolchain Xcode 27 and the iOS 27 SDK; Device Hub replaces Simulator.app
Android Gradle Plugin Expo modules tooling compatible with AGP 9
macOS Not supported in SDK 58
Expo Go SDK 58 build due in the stores within a few weeks of release

Before you upgrade: prepare the project

A little preparation makes the upgrade far less stressful. Commit or stash everything so that the upgrade lands as one clean diff you can review and revert. Run your existing test suite and a production build on SDK 57 first, so you know the starting state is green and you can tell a regression from a problem that was already there. If your project uses a lot of third-party native libraries, scan each one's repository for a note about React Native 0.88 and the iOS 27 SDK, because libraries that reach into UIScreen.main or the old app delegate hooks are the most likely to need updates.

It is also worth deciding whether you want to use Expo's upgrade skill. The changelog suggests trying the expo-upgrade skill with Claude Code or a similar coding agent. That can be a fast way to apply the mechanical parts, but the changelog's list of breaking changes is still the thing to review by hand, because several of them are behavior changes that compile fine and then act differently at runtime. Treat any agent-produced diff as a draft and read it with the breaking-changes section beside you.

Step-by-step: upgrading from SDK 57 to SDK 58

The sequence below mirrors the changelog's own upgrade instructions, with the reasoning behind each step. Do them in order, and commit between steps so that a failure points at a single change.

  1. Upgrade all dependencies to match SDK 58. From the project root, run the command in the block below. The --fix flag tells Expo to adjust installed packages to the versions that SDK 58 expects, which matters because Expo packages, react-native and a number of community libraries are pinned together.
BashCopy 

npx expo install expo@^58.0.0 --fix

  1. Check for known problems with Expo Doctor. Doctor inspects your dependency tree and configuration and reports mismatches. Run it with the command below, and resolve what it reports before you try to build, since a mismatched native module version is the classic cause of a build that fails halfway through.
BashCopy 


shell
npx expo-doctor@latest


plaintext

  1. Read the deprecations and breaking-changes sections of the changelog against your own code. This is the step people skip, and it is where most of the time should go. The next two sections of this guide summarize the items that are most likely to matter.

  2. If you customize AppDelegate.swift or manage the ios directory by hand, read the scene life cycle migration guide before building. This applies to bare React Native apps and to anyone who overrides app delegate methods directly. Expo forwards URL, user activity, Handoff, life cycle and quick action events to ExpoAppDelegate overrides and subscribers, so config plugins and modules built on those hooks keep working, but hand-written code in the app delegate may need to move into the scene delegate.

  3. If you use Continuous Native Generation, delete the android and ios directories if you generated them for a previous SDK version in your local project directory. They are regenerated the next time you run npx expo run:ios, npx expo prebuild, or an EAS Build. If you do not use Continuous Native Generation, run npx pod-install if you have an ios directory, and apply any relevant changes from the Native project upgrade helper. The changelog also suggests considering prebuild for easier upgrades in the future.

  4. If you use development builds, create a new development build for SDK 58 and install it on your test devices. A development build contains your native code, so an old build will not match the new JavaScript. Then start the dev server and check that the app launches on both platforms before you do anything else.

After the dependency step it is worth running your type checker. React Native 0.87 made the Strict TypeScript API the default, which can turn code that compiled yesterday into type errors today. That brings us to the first group of breaking changes.

Breaking changes that most often bite

React Native 0.87 and 0.88

The Strict TypeScript API is now the default in React Native 0.87. Deep imports from react-native/Libraries/* are type errors, and some types changed shape, most visibly refs, which now use instance types such as ViewInstance and TextInputInstance. Expo points to React Native's migration guide, and to a migrate-to-strict-api skill if you want to hand the work to an agent. If you cannot migrate immediately, you can defer by setting customConditions in tsconfig.json to the array containing react-native and react-native-legacy-deep-imports, while keeping the react-native entry that expo/tsconfig.base already sets. Expo warns that this opt-out is set to be removed after React Native 0.89, so use it as a bridge, not a destination.

Several APIs were removed outright: InteractionManager (use requestIdleCallback instead), the Touchable root export, the NativeMethods types, the Modal animated prop, and the deprecated StatusBar props backgroundColor, translucent and networkActivityIndicatorVisible. ImageBackground is deprecated in favor of a View with an absolutely positioned Image. A search across your repository for these names takes a minute and saves a confusing red screen later.

Environment variables and NODE_ENV

This is the change most likely to produce a bug that looks unrelated. Expo CLI now sets NODE_ENV to development or production based on the command you run and replaces any other value, so .env files and dynamic app configs always load in that mode. Expo gives a concrete example: running NODE_ENV=test npx expo start now loads .env.development rather than .env.test. Debug builds use development, and every other build, including custom configurations such as Staging, uses production. On EAS Build, expo config, expo prebuild and expo-doctor use production. If your team relied on a test or staging value of NODE_ENV to switch endpoints, rework that logic to use an explicit variable of your own.

Android release builds now use R8

The Android app template enables R8 by default in release builds through android.enableMinifyInReleaseBuilds=true in gradle.properties. R8 shrinks, optimizes and obfuscates Java and Kotlin code, which reduces app size and improves startup time, and apps are optimized with the proguard-android-optimize.txt preset. The risk is libraries that rely on reflection, which may need ProGuard keep rules. Test a release build, not just a debug build, and exercise every screen that touches a native library. To opt out while you sort out keep rules, set android.enableMinifyInReleaseBuilds to false through expo-build-properties.

Expo Router, server output and notifications

Expo Router projects on SDK 58 default to server output when web.output is not set, and server output renders HTML on each request instead of prerendering it during export. To keep the SDK 57 behavior, set web.output to static and enable the new apiRoutes option of the expo-router config plugin. Async routes on web are now enabled by default, which splits route files into separate JavaScript chunks; set asyncRoutes to web false to disable that. Loader responses now rely on the platform HTTP cache, so set a Cache-Control header in your loader to control reuse. And on web, Expo Router no longer provides safe-area insets through react-native-safe-area-context, so use the CSS env(safe-area-inset-*) values instead.

For notifications, foreground notifications are now shown by default unless your setNotificationHandler says otherwise, and a slow handler no longer drops the notification. If your app suppressed foreground banners by simply not handling them, add an explicit handler. Other smaller but real changes: File.write() in expo-file-system is now async and returns a promise, with File.writeSync() for the old behavior; libSQL support was removed from expo-sqlite, including syncLibSQL() and libSQLOptions; and expo login now uses browser-based login by default, with --no-browser or --username and --password for the previous behavior, which matters for CI scripts.

Expo UI layout defaults

If you use @expo/ui, three layout changes can shift your screens by a few points without any error. On iOS, Host top-aligns its content instead of centering it, so a Host with flex 1 now matches Android. HStack, VStack and GlassEffectContainer forward an unset spacing to SwiftUI as nil and therefore use the system default spacing; pass spacing equal to 0 to keep the previous layout. On Android, the style prop is removed from RNHostView, so use modifiers instead. A visual check of every screen built with these components is the only reliable test.

Deprecations to clear while you are in there

Deprecations do not break your build, but they tell you where the next release will. File.md5 is deprecated in favor of File.digest(), which also supports SHA-1, SHA-256, SHA-384 and SHA-512. NativeArrayBuffer in expo-modules-core is deprecated in favor of ArrayBuffer. The AppMetrics export of expo-observe is deprecated in favor of Observe. In expo-router, withLayoutContext is deprecated in favor of integrateWithRouter. On @expo/ui for iOS, backgroundOverlay is deprecated in favor of background, the color parameter of border and strokeBorder in favor of content, and passing elements as List.ForEach children in favor of data, keyExtractor and a children function. The useLibSQL config plugin property in expo-sqlite no longer has any effect.

The List.ForEach change is worth a short example, because the new pattern is also the one that unlocks virtualized, recycling lists. The changelog shows rows rendered from data with a key extractor rather than from child elements:

TypeScript (TSX)Copy 


jsx
export function Contacts({ contacts }) {
return (


contact.id}>
{renderContact}



);
}


markdown

With this form, List, LazyVStack and LazyHStack on iOS, and LazyColumn and LazyRow on Android, render only the rows near the visible area and reuse them as you scroll. Expo recommends reading its best-practices guides for large lists in SwiftUI and Jetpack Compose before you switch, since recycled rows must not hold state that belongs to a specific item.

Testing the upgrade on iOS 27 and iPhone Duo

Once the app builds, test the things that iOS 27 changes. Because apps built with the iOS 27 SDK are resizable on iPhone, any assumption that your window is a fixed size is now suspect. On iOS 27, requireFullScreen no longer opts your app out of resizing, and ScreenOrientation.lockAsync may have no effect while the app is resizable, so if you lock orientation for a camera or game screen, test what actually happens and read Expo's note on orientation locks on iOS 27 and later. Expo packages no longer read geometry from UIScreen.main, but your own code or a third-party library might, and those are worth grepping for.

Xcode 27 replaces Simulator.app with Device Hub, and Expo CLI detects Device Hub, boots simulators through it and focuses the right device using its devices:// deep link. If you prefer to stay in the browser, install the new expo-device-hub dev tools plugin with the command below, run npx expo start, and open the link printed in the terminal. It shows a live stream of every iOS simulator and Android emulator that you can tap, swipe and type into, with boot and shutdown controls, CPU, memory and network graphs, and toggles for appearance, Liquid Glass, text size and accessibility settings.

BashCopy 


shell
npx expo install expo-device-hub
npx expo start

For iPhone Duo readiness, update react-native-safe-area-context with npx expo install react-native-safe-area-context, because horizontal insets matter more on that device, and you may need SafeAreaView in more places, such as inside scroll views. Expo UI adds ArrangementView, the SwiftUI container that Apple recommends for iPhone Duo, which places a primary and a secondary view side by side or as an overlay and adapts to the fold. Expo's guidance is to use the hinge state for interactions and effects, such as a tabletop camera shutter, and not for layout.

Optional features worth trying after the upgrade

None of these is required, and several are experimental, so adopt them on a branch and measure. Android builds get faster for free: expo-modules-core now ships precompiled native libraries for all four ABIs in debug and release variants. In Expo's test on a blank SDK 58 project, a clean Android debug build for all four ABIs dropped from about 80 seconds to about 39 seconds on an Apple M3 Pro, with a bigger saving on machines with fewer cores such as CI runners. If you need to compile from source, set android.buildExpoModulesCoreFromSource through expo-build-properties.

The new default for fingerprinting is the balanced preset, which ignores common cases such as updating the version in app.json and hashes native modules by package name and version, so bumping a version no longer produces a new fingerprint and fewer native rebuilds are triggered. If you want a different tradeoff, read about fingerprint presets. For cold bundling, an experimental Rust-based transformer can be switched on through experiments.noxcturnalTransformWorker in your app config. It only activates when the project has no custom transform worker and no custom Babel plugins or presets, and it skips files that need the Reanimated or Worklets Babel transforms. In Expo's largest test, a cold bundle of roughly 5,500 files went from 5.26 seconds to 2.46 seconds, with 443 files falling back to Babel. Treat those numbers as the vendor's, and expect them to change before the feature is stable.

Android developers get home screen widgets in expo-widgets, running their own JavaScript bundle on a dedicated Hermes runtime. The Expo CLI tunnel is now built on @expo/ws-tunnel, no longer needs @expo/ngrok, and requires you to be signed in with expo login; the legacy tunnel remains available with --tunnel ngrok. For CI and end-to-end tests, set EXPO_NO_DEV_MENU=1 to add the three _expo_disable* parameters to every launch URL and QR code, which hides the onboarding screen, the floating Tools button and the automatic dev menu. Expo CLI does this by default when it is not interactive.

Troubleshooting

If the install step fails with engine or peer dependency errors, check your Node.js version first, since SDK 58 tooling does not support odd-numbered Node releases. If expo-doctor reports a version mismatch after the fix step, run the install command again and then delete node_modules and your lockfile only as a last resort, because that can move unrelated packages.

If your iOS build fails after upgrading and you hand-manage the ios directory, the cause is very likely the scene life cycle. The SDK expects a SceneDelegate and the manifest entry, so compare your project with a freshly generated one from npx expo prebuild in a scratch copy, and move your custom app delegate code into the right place. If the app launches but a deep link or quick action stops working, check that your handlers are registered through ExpoAppDelegate subscribers, which Expo forwards those events to.

If an Android release build crashes in a screen that works in debug, suspect R8. Reproduce with a release build, read the stack trace for a missing class or method, and add a keep rule for that library, or temporarily set android.enableMinifyInReleaseBuilds to false to confirm. If environment variables look wrong, print which .env file is loading, remembering that NODE_ENV is now derived from the command, and that custom configurations such as Staging count as production.

If TypeScript suddenly reports errors on refs or deep imports, you are seeing the Strict TypeScript API. Migrate the types, or use the tsconfig opt-out as a short-term bridge. If a web build now behaves differently, check the server-output default and the async-routes default in Expo Router before debugging anything else.

Frequently Asked Questions

Do I have to upgrade to SDK 58 right now?

Not necessarily. The urgency depends on whether you are building against the iOS 27 SDK with Xcode 27. If you are not, you can plan the upgrade, but Expo Go in the stores will eventually support only SDK 58, and the changelog's breaking-change list is easier to handle early than under deadline.

Will Expo Go work with SDK 58 today?

At release, the SDK 58 version of Expo Go was not yet in the App Store or Google Play, with Expo saying it would arrive within a few weeks. Until then, create new SDK 58 projects with npx create-expo-app --template default@sdk-58 and use a development build. Expo also reminds developers that Expo Go is an educational tool and that apps being shipped should use a development build.

Is the Rust-based transformer safe for production?

It is described as experimental, and Expo says the implementation and the numbers may change before it is stable. It only activates in projects without custom transform workers or custom Babel plugins, so try it on a branch and compare output and bundle times before you consider it for CI.

What does the new tunnel require?

The new default tunnel for expo start --tunnel uses @expo/ws-tunnel and requires you to be signed in with expo login. If you prefer the previous behavior, pass --tunnel ngrok. Note that expo login itself now opens a browser by default, so CI should use --username and --password, or the option Expo documents for non-browser login.

Are expo-app-intents and Expo Modules 2.0 ready to ship?

Expo labels expo-app-intents as alpha and Expo Modules 2.0 as beta on both iOS and Android. They are interesting, particularly the 2.0 annotations model, but keep them out of production code paths until their documentation and stability catch up.

How do I roll back if something goes wrong?

Because you committed before upgrading, revert the commit, reinstall dependencies, and rebuild your development build for SDK 57. If you deleted generated ios and android directories under Continuous Native Generation, they regenerate from your configuration on the next build.

Images: Expo (official changelog images, from the SDK 58 announcement).

Originally published on Mango Developer.

原文:https://www.a8q9.cn/en/article/how-to-upgrade-your-app-to-expo-sdk-58-ios-27-scene-life-cycle-react-native-0-88-96e998.html

相关文章