iOS 模拟器部署目标“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0 - React Native、VS Code

M-W*_*WRI 6 macos xcode ios reactjs react-native

嘿 Stackoverflow 社区,

我对 React Native 完全陌生,并且在第一步中已经很困难了。我已经根据这个网站完成了所有操作:https ://reactnative.dev/docs/environment-setup

我已经安装了node和watchman 我有X Code运行用于模拟 我已经安装了cocoa pods 我使用的编辑器是VS Code,终端是iTerm。

我创建了一个测试项目,如文档中所述。

npx react-native init AwesomeProject
Run Code Online (Sandbox Code Playgroud)

之后,我进入文件夹并在两个不同的终端中运行。

npx react-native start
Run Code Online (Sandbox Code Playgroud)
npx react-native run-ios
Run Code Online (Sandbox Code Playgroud)

当我在 YouTube 上看到人们这样做时,它总是有效,但我得到的是以下内容:

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'YogaKit' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-PeerTalk' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-Glog' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-DoubleConversion' from project 'Pods')
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the AwesomeProject editor. (in target 'AwesomeProject' from project 'AwesomeProject')

** BUILD FAILED **


The following build commands failed:
    CompileC /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/mw/Desktop/AwesomeProject/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Run Code Online (Sandbox Code Playgroud)

如果有人能帮助我解决这个问题,我会非常高兴。我在 Stackoverflow 上看过其他一些帖子,但没有任何帮助。

非常感谢

更新

在我做出之后我已经改变了

cd AwesomeProject/ios
a) Comment this line in Podfile
   # use_flipper!()
b) pod install
Run Code Online (Sandbox Code Playgroud)

随着跑步:

npx react-native run-ios
Run Code Online (Sandbox Code Playgroud)

我收到此错误消息:

    /bin/sh -c /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-90F0FABA0342DD788075D851B9320B7C.sh
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
Command PhaseScriptExecution failed with a nonzero exit code

warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the AwesomeProject editor. (in target 'AwesomeProject' from project 'AwesomeProject')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-90F0FABA0342DD788075D851B9320B7C.sh
(1 failure)
Run Code Online (Sandbox Code Playgroud)

在研究这个错误消息时,我发现它可能与 NodeJS 有关,但 Node 已安装。

Phi*_*ppe 9

您需要一个额外的步骤:

1) npx react-native init AwesomeProject

2) cd AwesomeProject/ios
   a) Comment this line in Podfile
      # use_flipper!()
   b) pod install

3) cd ..
   npx react-native run-ios
Run Code Online (Sandbox Code Playgroud)