You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native 0.76.3升级Xcode16后RCTAppDelegate.h文件找不到

React Native 0.76.3 升级Xcode 16.1后出现 'RCTAppDelegate.h' 文件未找到错误

仅将Xcode升级至16.1后,React Native 0.76.3环境中出现了'RCTAppDelegate.h'文件未找到的编译错误。已尝试GitHub issue#36611中的所有解决方案,但均未生效。本人未对React Native进行版本升级操作,已知该问题在RN 0.71版本后出现。

相关配置信息

Podfile

# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported

# Prepare React Native project
prepare_react_native_project!

# Framework linkage configuration
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

# Main target configuration
target 'yourappname' do
  config = use_native_modules!
  
  # Use frameworks with static linkage
  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true
  
  # Use React Native settings
  use_react_native!(
    :path => config[:reactNativePath],
    # Specify the absolute path to the application root
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  # Tests target configuration
  target 'yourappnameTests' do
    inherit! :complete
    # Pods for testing
  end
end

# Post-installation configurations
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      # Exclude arm64 architecture for iPhone Simulator
      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
    end
  end
end

npx react-native-info 输出

info Fetching system and libraries information...
System:
  OS: macOS 14.5
  CPU: (12) arm64 Apple M2 Pro
  Memory: 61.25 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.4
    path: ~/.nvm/versions/node/v18.20.4/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.1
    path: ~/node_modules/.bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10811636
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.3
    wanted: 0.76.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

package.json 依赖部分

"dependencies": {
    "@react-native-async-storage/async-storage": "^2.1.0",
    "@react-native-firebase/app": "^19.0.0",
    "@react-native-firebase/auth": "^19.0.0",
    "@react-native-firebase/firestore": "^19.0.0",
    "@react-navigation/bottom-tabs": "^7.0.12",
    "@react-navigation/native": "^7.0.7",
    "@react-navigation/native-stack": "^7.1.8",
    "axios": "^1.7.8",
    "moment": "^2.30.1",
    "react": "18.3.1",
    "react-native": "0.76.3",
    "react-native-calendars": "^1.1286.0",
    "react-native-gesture-handler": "^2.21.2",
    "react-native-get-random-values": "^1.11.0",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-pdf": "^6.7.5",
    "react-native-reanimated": "^3.16.3",
    "react-native-safe-area-context": "^4.14.0",
    "react-native-screens": "^4.3.0",
    "react-native-svg": "^15.9.0",
    "react-native-uuid": "^2.0.3",
    "react-native-vector-icons": "^10.2.0",
    "react-native-video": "^6.8.2",
    "react-native-webview": "^13.12.4"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@babel/preset-env": "^7.25.3",
    "@babel/runtime": "^7.25.0",
    "@react-native-community/cli": "15.0.1",
    "@react-native-community/cli-platform-android": "15.0.1",
    "@react-native-community/cli-platform-ios": "15.0.1",
    "@react-native/babel-preset": "0.76.3",
    "@react-native/eslint-config": "0.76.3",
    "@react-native/metro-config": "0.76.3",
    "@react-native/typescript-config": "0.76.3",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.3.1",
    "typescript": "5.0.4"
  },

内容的提问来源于stack exchange,提问作者kursad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 16:25:58