Skip to content

iOS Crash When use_frameworks! and use ENV['RCT_NEW_ARCH_ENABLED'] = '1' #2228

@Yck-Dakucha

Description

@Yck-Dakucha

Description

iOS Crash When use_frameworks! and use ENV['RCT_NEW_ARCH_ENABLED'] = '1'

CrashInfo

Running "TestRNScreen" with {"rootTag":1,"initialProps":{"concurrentRoot":true},"fabric":true}
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RNSScreenStackHeaderConfig setHide:]: unrecognized selector sent to instance 0x10692df90'

Env

System:
  OS: macOS 14.5
  CPU: (12) arm64 Apple M2 Max
  Memory: 99.48 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.2
    path: ~/.nvm/versions/node/v18.18.2/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.18.2/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.2/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "31"
      - "34"
    Build Tools:
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10406996
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 20.0.2.1
    path: /usr/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/yangcankun/.rvm/rubies/ruby-3.1.2/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: false
  newArchEnabled: true

Reason i guess

fabric doesn’t support use_frameworks! ,when use_frameworks! fabric will set RCT_DYNAMIC_FRAMEWORKS=1 to backward compatibility.

image

You can use my demo to reproduce the crash

https://github.com/Yck-Dakucha/TestRNScreenCrash

Steps to reproduce

  1. use_frameworks!
  2. ENV['RCT_NEW_ARCH_ENABLED'] = '1'
  3. pod install
  4. run

Snack or a link to a repository

https://github.com/Yck-Dakucha/TestRNScreenCrash

Screens version

3.32.0

React Native version

0.74.3

Platforms

iOS

JavaScript runtime

JSC

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 15 Pro (17.5)

Acknowledgements

Yes

Metadata

Metadata

Assignees

Labels

Platform: AndroidThis issue is specific to AndroidPlatform: iOSThis issue is specific to iOSPlatform: tvOSIssue related with tvOS compatibilityRepro providedA reproduction with a snack or repo is provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions