如何更改 react-native xcodebuild 的目标 ID

问题描述

我是 mac 新手,我正在尝试克隆我当前的 WIP react 本机项目(仅针对 iOS 构建)并在我的新 Mac 机器上进行设置。但是我不断遇到以下错误,我在 Xcode xcworkspace 中到处搜索,尝试了很多设置更改(部署目标等),但不知道如何更改目标 ID。请帮忙。谢谢。

elliotkaliv@Elliots-Mac-mini projNameeeeeeee % yarn ios
yarn run v1.22.10
$ npx react-native run-ios --simulator='iPad Air'
warn Package filenamify has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/elliotkaliv/Documents/prjs/projNameeeeeeee/node_modules/filenamify/package.json
error React Native CLI uses autolinking for native dependencies,but the following modules are linked manually: 
  - react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward,you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking,disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Found Xcode workspace "projNameeeeeeee.xcworkspace"
info Building (using "xcodebuild -workspace projNameeeeeeee.xcworkspace -configuration Debug -scheme projNameeeeeeee -destination id=DDAF30B3-2CC8-460E-B05A-0E672CE9C59C")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 70. To debug build logs further,consider building your app with Xcode.app,by opening projNameeeeeeee.xcworkspace.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace projNameeeeeeee.xcworkspace -configuration Debug -scheme projNameeeeeeee -destination id=DDAF30B3-2CC8-460E-B05A-0E672CE9C59C

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES


xcodebuild: error: Unable to find a destination matching the provided destination specifier:
                { id:DDAF30B3-2CC8-460E-B05A-0E672CE9C59C }

        Available destinations for the "projNameeeeeeee" scheme:
                { platform:macOS,arch:arm64,variant:Designed for [iPad,iPhone],id:EFF665D5-5FBC-514A-BBD3-F593B237E458 }
                { platform:iOS Simulator,id:96C0A232-B926-4C02-9DF6-89066487EF8D,OS:14.4,name:iPad (8th generation) }
                { platform:iOS Simulator,id:1F102212-0663-4AC1-8AF3-A6A46059B35C,OS:14.5,id:A193D152-0330-4FE5-BF13-874BA3538AC2,OS:14.1,name:iPad Air (4th generation) }
                { platform:iOS Simulator,id:F67B9A1B-E43A-47D7-9996-303E37CE9E91,id:2DDEB0DB-D658-4343-9BBC-A2AE9BDFCBF4,name:iPad Pro (9.7-inch) }
                { platform:iOS Simulator,id:FB9B5898-9892-420B-BB70-67E19CF1BEEE,id:EB82A729-BD5E-4F70-9F00-AE590AF743D0,id:C58EB805-AFD9-4FA1-8FA5-EAA4034AA915,name:iPad Pro (11-inch) (2nd generation) }
                { platform:iOS Simulator,id:E3496671-D43A-4E1A-B33D-476F2022FFB4,id:0965280C-C978-4721-B720-D51AF187CCA9,name:iPad Pro (11-inch) (3rd generation) }
                { platform:iOS Simulator,id:29A34DD5-637E-41A8-9F11-B3EA9660083B,name:iPad Pro (12.9-inch) (4th generation) }
                { platform:iOS Simulator,id:8D1E91AE-D046-43C6-8E56-DC16B01DDCC6,id:1C028811-E780-40D1-BDE0-73105A705367,name:iPad Pro (12.9-inch) (5th generation) }

        Ineligible destinations for the "projNameeeeeeee" scheme:
                { platform:iOS,id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder,name:Any iOS Device }
                { platform:iOS Simulator,id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder,name:Any iOS Simulator Device }

info Run CLI with --verbose flag for more details.
error Command Failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)