React Native 'yarn run ios' 不会在 M1 上初始化项目

问题描述

我是 Mac OS 及其系统和 M1 的新用户。每当我尝试 yarn run ios 命令时,它都会打开普通模拟器,而不是我正在构建的项目,它会向我抛出错误错误代码 65:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further,consider building your app with Xcode.app,by opening dealerApp.xcodeproj.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project dealerApp.xcodeproj -configuration Debug -scheme dealerApp -destination id=0A358C3D-FE10-4872-9913-F927BCC93B29

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Using build description from disk
note: Build preparation complete
PhaseScriptExecution Start\ Packager /Users/bigez/Library/Developer/Xcode/DerivedData/dealerApp-cixnurkshkczahhihjqgcgbblssu/Build/Intermediates.noindex/dealerApp.build/Debug-iphonesimulator/dealerApp.build/Script-FD10A7F022414F080027D42C.sh (in target 'dealerApp' from project 'dealerApp')

解决方法

我通常运行 yarn ios

此外,您可以尝试使用 Xcode 运行该项目。它应该为您提供更有用的错误日志,以便您可以找出真正的问题所在。寻找红色的 X 图标,看看它们在说什么。