在 iOS 模拟器上无法在 React native 中使用 运行 应用程序

Cant run app in React native on iOS simulator

我正在 MacBook Air m1 上制作 React 本机 iOS 应用程序。当我在 vscode 中 运行 npx react-native run-ios 时,我得到了很多错误:

当我尝试从 Xcode(来自 'name.xcworkplace')构建它时,我遇到了这些错误:

当我从 Xcode(从 'name.xcodeproj')构建它时,它 运行 是 metro 服务器,但在 iOS 模拟器上构建失败。我收到这些错误:

这是我的 Podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.0'

target 'authier' do
  config = use_native_modules!

  pod 'Firebase/Analytics'
  pod 'Firebase/Messaging'

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )


  target 'authierTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  #use_flipper!()

  #post_install do |installer|
   # react_native_post_install(installer)
  #end
end

我花了一个星期的时间想弄明白,但我几乎迷路了。 如果您有任何问题,请随时提出! 非常感谢您的帮助。

问题出在 Xcode 版本中。我使用版本 13 beta。在我重新安装 Xcode 并下载稳定的 12.5 版本后,它可以正常工作。