Skip to content

feat: adopt SceneDelegate - #246

Merged
cipolleschi merged 5 commits into
react-native-community:mainfrom
artus9033:feat/scene-delegate
Sep 17, 2026
Merged

cipolleschi merged 5 commits into
react-native-community:mainfrom
artus9033:feat/scene-delegate

Conversation

@artus9033

@artus9033 artus9033 commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

This PR migrates to SceneDelegate to make React Native apps bootstrapped with the Community Template and built with Xcode 27+ run on iOS 27+. It is based on instructions from react/react-native-website#5176 (with exception of devMenuConfiguration in SceneDelegate.swift, which is added in the template).

This PR should be merged after the following PR to React Native is merged: react/react-native#53744

Changelog:

[IOS] Adopt UIScene lifecycle (migrate to SceneDelegate)

Test Plan:

CI green, working locally.

@samuel59333

Copy link
Copy Markdown

Good

@cortinico

Copy link
Copy Markdown
Member

This is quite invasive change to the template. Can it wait till beginning of September? cc @cipolleschi

@cipolleschi

cipolleschi commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

that's tricky. This needs to land after we land react/react-native#53744. This PR is technically additive and not breaking.

However, Apple will start rejecting apps that are not using the SceneDelegate at some point and app built with Xcode27 (that's going to exit beta in September) will crash at startup.
So the sooner we merge this, the better. However, we can't merge this before we merge the React Native one.

@cipolleschi
cipolleschi merged commit 2858702 into react-native-community:main Sep 17, 2026
1 check passed
cipolleschi added a commit that referenced this pull request Sep 17, 2026
Co-authored-by: Riccardo Cipolleschi <cipolleschi@meta.com>
Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
pawicao added a commit to software-mansion/react-native-reanimated that referenced this pull request Sep 22, 2026
…ne lifecycle (#10650)

> [!NOTE]
> This pull request was authored by AI on behalf of @pawicao.

## Summary

React Native 0.88.0-rc.2 is out, and it moves the app startup from the
app delegate to a scene delegate. I bumped `react-native` and every
pinned `@react-native/*` package from `0.88.0-rc.1` to `0.88.0-rc.2` in
the root workspace, in both library packages and in the `common-app`,
`fabric-example`, `next-example` and `web-example` apps, then refreshed
`yarn.lock` and the `fabric-example` `Podfile.lock`. I moved the React
Native startup of `fabric-example` out of `AppDelegate.swift` into a new
`SceneDelegate.swift` and declared the scene in `Info.plist`, as the
[upgrade
helper](https://react-native-community.github.io/upgrade-helper/?from=0.88.0-rc.1&to=0.88.0-rc.2)
and the [template pull
request](react-native-community/template#246)
show. The new scene delegate keeps three parts of the old app delegate
that the template does not have: the `RUNTIME_TESTS` module name and
bundle URL, the experimental release level, and the `sourceURL(for:)`
override that the old app delegate also had.

The second commit raises the `fabric-example` deployment target from
13.4 to 15.1. That change is not in the upgrade diff, so it is a commit
of its own: Xcode 27 does not accept 13.4, and the template already uses
15.1.

The third commit moves the Bundle Mode Metro patches from Metro 0.87.0
to 0.87.1, because rc.2 raises the minimum Metro version to 0.87.1
([release
notes](https://github.com/react/react-native/releases/tag/v0.88.0-rc.2)).
Metro 0.87.1 rewrote `DependencyGraph.js`, so I re-applied the `metro`
patch by hand; the `metro-runtime` patch applied unchanged. I added
copies of both patches to
`packages/react-native-worklets/bundleMode/patches` next to the older
versions.

`macos-example` and `tvos-example` keep their pins, because they follow
`react-native-macos` and `react-native-tvos`. Their `Podfile.lock` files
also changed when I ran `yarn build-apps`, but only in the
`RNReanimated`, `RNWorklets` and `hermes-engine` checksums. Those
checksums follow the `IS_REANIMATED_PROFILING`, `IS_WORKLETS_PROFILING`
and `RCT_HERMES_V1_ENABLED` environment variables, so the change comes
from my shell and not from this upgrade. I reverted both files.

## Test plan

- `yarn build-packages`, `yarn workspace react-native-reanimated
type:check`, `yarn workspace react-native-reanimated lint:js`, `yarn
workspace react-native-worklets type:check`, `yarn workspace
react-native-reanimated validate-peers` and `yarn format:md` all pass.
- With a fresh `--reset-cache` Metro 0.87.1, both apps load in Bundle
Mode, the `.worklets` chunks are regenerated, and a Fast Refresh
replaces a screen's text on Android without a reload.
- `fabric-example` builds with Xcode 27.1 and with Gradle, and starts on
an iPhone Duo simulator and on a Pixel 9 Pro Fold emulator. The examples
list shows, an example screen opens, and the iOS device log has no
exception, no `Terminating` and no unrecognized selector.

## Changelog

- [x] I added an entry to the `Unpublished` section of each changed
package's `CHANGELOG.md`, or this PR does not change
`react-native-reanimated` or `react-native-worklets`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants