问题
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{id:AB4E23AF-99E0-4223-B359-CD260C6D8C44} 这个是模拟器的唯一id
解决办法
方案一(最新!!!)
命令行输入
cd ios
pod install
然后重新run
如果podinstall 的时候报错如下图,The version of CocoaPods used to generate the lockfile (1.9.3) is higher than the version of the current executable (1.9.0). Incompatibility issues may arise.
命令行
pod update //或者可以直接更新pod _0.25.0_ setup 中间是固定版本
sudo gem uninstall cocoapods //卸载不符合规定版本的pod
sudo gem install cocoapods -v 1.9.3 //--安装规定的版本
pod install
就可以继续run 了--应该可以成功,这边比较慢一点
方案二
分组查看-终端中运行
xcrun simctl list devices
会出现如下列表
iPad Pro (11-inch) (2nd generation) (920C81A9-5DCA-40B2-B7B9-83A619486FA8) (Booted)
iPhone 7 (11.2) [730D0B4A-65C7-40C2-8BF9-F42114FFA41A] (Simulator)
iPhone 7 (11.2) + Apple Watch Series 2 - 38mm (4.2) [CA0DD4A2-A03C-4B65-85BF-B329929BCFDC] (Simulator)
iPhone 7 Plus (11.2) [601F0F70-72BF-4E3C-B7C4-CB0D93CD8DCB] (Simulator)
iPhone 7 Plus (11.2) + Apple Watch Series 2 - 42mm (4.2) [A3D58728-B26A-415A-B82B-AF0F4B5D5C49] (Simulator)
iPhone 8 (11.2) [E6EF973F-2470-4644-875F-6D2422764F60] (Simulator)
iPhone 8 (11.2) + Apple Watch Series 3 - 38mm (4.2) [AF04DA7E-32B4-4484-8C31-AE50AE0962DD] (Simulator)
iPhone 8 Plus (11.2) [3C50694A-55A2-42F4-B2D2-06A0F29B8C2D] (Simulator)
iPhone 8 Plus (11.2) + Apple Watch Series 3 - 42mm (4.2) [62AC89B9-E8E5-4CBF-9AFA-514AC3BD8105] (Simulator)
iPhone SE (11.2) [9C15AC46-816E-4A85-9F21-A693CE34D542] (Simulator)
iPhone X (11.2) [626866A7-B843-4CCF-B27D-00420F5F16DB] (Simulator)
从上述列表中选择一个,更改package.json中放在红色的位置
运行命令,这个命令根据你们自己的package.json中的文件修改即可
npm run ipad:no-auth