添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
豪气的眼镜  ·  DeviceInformation.Crea ...·  6 月前    · 
多情的伏特加  ·  06 MAUI,WPF使用 MVVM ...·  9 月前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues

Ask Question

i updated os 12.3 to 13.1, xcode 13.1 to 14.1 and installed commandline tools, react native app running through xcode but not running with command line, getting below error

    2022-12-13 16:36:47.584 xcodebuild[3616:20381] Writing error result bundle to /var/folders/zn/6l6295m57kb3vn_8pyn8xtbr0000gn/T/ResultBundle_2022-13-12_16-36-0047.xcresult
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk" cannot be located.
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk' (errno=No such file or directory)
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -find simctl 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues.
Error: Command failed: xcrun simctl list --json devices
2022-12-13 16:36:47.584 xcodebuild[3616:20381] Writing error result bundle to /var/folders/zn/6l6295m57kb3vn_8pyn8xtbr0000gn/T/ResultBundle_2022-13-12_16-36-0047.xcresult
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk" cannot be located.
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk' (errno=No such file or directory)
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -find simctl 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:863:15)

but react native app running fine if run this command export SDKROOT=$(xcrun -sdk macosx --show-sdk-path) before running react-native run-ios, if i close the terminal and run again the react native app it is showing same error again

i tried these steps

sudo xcode-select --reset
sudo xcode-select --install
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.