Skip to content

fix: adopt UIScene lifecycle so iOS 27 apps launch - #251

Closed
thang2162 wants to merge 1 commit into
react-native-community:0.87-stablefrom
thang2162:fix/ios-27-scene-lifecycle
Closed

thang2162 wants to merge 1 commit into
react-native-community:0.87-stablefrom
thang2162:fix/ios-27-scene-lifecycle

Conversation

@thang2162

Copy link
Copy Markdown

Summary

Apps generated from this 0.87 template crash immediately on launch when built with Xcode 27 / the iOS 27 SDK. UIKit asserts in ___UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption because the template still creates UIWindow from AppDelegate and does not declare a scene manifest.

This migrates the iOS template to the UIScene lifecycle using APIs that already exist on React Native 0.87 (startReactNative(withModuleName:in:launchOptions:)). It does not depend on RCTSceneDelegate or connectionOptions:, which only landed on 0.88+/main.

Related:

Changelog

[IOS] [FIXED] - Adopt UIScene lifecycle so apps built with Xcode 27 launch on iOS 27

Test Plan

  • Generated app from this template pattern and ran on iOS 27 simulator (iPhone 18 Pro)
  • Confirmed the previous AppDelegate-only bootstrap SIGTRAPs in NoSceneLifecycleAdoption
  • Confirmed the SceneDelegate bootstrap reaches Metro and shows the Welcome screen
  • yarn test in this repo

Made with Cursor

Xcode 27 / the iOS 27 SDK asserts at startup unless the app uses a
scene-based lifecycle. Create the React Native window from SceneDelegate
using the 0.87 startReactNative(launchOptions:) API.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cortinico

Copy link
Copy Markdown
Member

cc @cipolleschi

@cipolleschi

Copy link
Copy Markdown
Contributor

Thanks for putting this together and for testing it on iOS 27.

Unfortunately, we can’t merge this PR into 0.87-stable. React Native 0.87 does not contain the complete UISceneDelegate support added in 0.88. Although this workaround allows the app to launch, it would introduce regressions:

  • Cold-start deep links and Universal Links would be lost because they arrive through UIScene.ConnectionOptions, not the AppDelegate’s launchOptions.
  • Links received while the app is running would not reach Linking, because 0.87 lacks the SceneDelegate forwarding APIs.
  • Some window resizing, external-display, and development loading-view behavior may be incorrect because the corresponding scene-aware fixes are also absent from 0.87.

Backporting only the template changes would therefore leave 0.87 in a partially supported state. A safe solution would require backporting and releasing the relevant React Native core machinery as well, which is too broad and risky for the stable branch.

Thanks again for identifying the issue and proposing a solution. Full SceneDelegate support will be available starting with 0.88.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants