欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Mac iOS com.apple.CoreSimulator.SimDeviceType.undefined

程序员文章站 2022-05-12 16:54:32
命令行中编译项目成功,但是无法直接运行至模拟器,提示如下错误: no target specified for emulator. deploying to undefined simulatord...

命令行中编译项目成功,但是无法直接运行至模拟器,提示如下错误:

no target specified for emulator. deploying to undefined simulatordevice type "com.apple.coresimulator.simdevicetype.undefined" could not be found.[error] an error occurred while running cordova run ios (exit code 1).

解决方案:

在项目中运行如下命令

cd platforms/ios/cordova && npm install ios-sim@latest

原理还不清楚。