react / react/react-native

0.87 and below: Crash upon launch iOS 27

未关闭
#58,545 13 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Needs: Attention Needs: Repro
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

Edited description:

In iOS 27, it’s required to handle Lifecycles with SceneDelegate. Failing to adhere to this will cause a crash upon app launch. There is a console output in the Xcode console regarding the SceneDelegate requirement but none that I know of in Metro / RN Dev Tools, I have not checked them.

The concerning part is that an app that does launch on an iOS 26 simulator/phone will fail to launch at all on iOS 27, even though compiling in Xcode 27 will be succesful. Crash with no error output, just silently (for the end user).

Since iOS support has been quite stable historically, at least in my limited experience, this can lead to a dev thinking iOS 26 support = iOS 27 support. However, that does seem to be the case as long as you are on Xcode 26 or below. I believe building and distributing through Xcode 27 is required for the app to crash on iOS 27.

In my case the app even passed App Store review and came all the way through.

Updates to AppDelegate, SceneDelegate, info.plist and pbxproject are needed. As far as I understand, The React Native team have yet to decide an official implementation. However, applying these linked fixes will work for 0.86 and 0.87 (and possible more versions):

https://github.com/lodev09/react-native-true-sheet/pull/843/changes#diff-dc87f0be9c8ca3a727efb4fd5d77e6b551d8cee9fe22fea2c07062f907f6507bR15

Original description kept below:

Yesterday I tested a working copy of my app. When done, I upgraded to Golden Gate and Xcode 27.

This morning I used xcode 27 to distribute to Apple Store. I did not try to run the app before this. The app built fine. App Store deploy. Apple approved it. However, it does not ****** run. It crashes immedately. Since this SceneDelegate portion is missing and xcode 27 needs it.

So Apple has somehow approved an app that crashes immediately.

I'm stressed as hell right now. How do I make my RN 87.1 app support this new iOS 27 / macOS 27 SceneDelegate stuff?

Steps to reproduce

Create an app using React Native new-app. Launch on iOS 27 simulator and watch it crash.

React Native Version

0.87.1 and below

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info
System:
  OS: macOS 27.0
  CPU: (10) arm64 Apple M4
  Memory: 68.91 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 26.8.2
    path: /opt/homebrew/bin/node
  Yarn: Not Found
  npm:
    version: 11.19.1
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2026.07.27.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/alexstrae/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 27.0
      - iOS 27.0
      - macOS 27.0
      - tvOS 27.0
      - visionOS 27.0
      - watchOS 27.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.27397.103.2522.14514259
  Xcode:
    version: 27.0/27A266a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.15
    path: /usr/bin/javac
  Ruby:
    version: 3.4.4
    path: /Users/alexstrae/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.2.0
    wanted: 20.2.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.87.1
    wanted: 0.87.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
no
MANDATORY Reproducer

no

Screenshots and Videos

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先创建一个新的 React Native 应用,并在 iOS 27 模拟器上启动它,以复现静默崩溃。阅读 issue 中引用的 AppDelegate、SceneDelegate、info.plist 和 pbxproject 更改,并将其与链接的 pull request 进行比较。当使用 React Native 0.87.1 或更低版本的应用能够在 iOS 27 上成功启动时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。