小编Seo*_*hoo的帖子

`react-native run-ios`返回错误:找不到iPhone X模拟器

每当我跑步时react-native run-ios,我都会

Could not find iPhone X simulator

Error: Could not find iPhone X simulator
    at resolve (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
    at new Promise (<anonymous>)
    at runOnSimulator (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
    at Object.runIOS [as func] (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
    at Promise.resolve.then (calendarPractice/node_modules/react-native/local-cli/cliEntry.js:117:22)
Run Code Online (Sandbox Code Playgroud)

但是,当我在Xcode上运行时,它工作正常

{
  "devicetypes" : [
    {
      "name" : "iPhone 4s",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 4s.simdevicetype",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-4s"
    },
    {
      "name" : "iPhone 5",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5.simdevicetype",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-5"
    },
    {
      "name" : "iPhone 5s",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5s.simdevicetype",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-5s"
    },
    { …
Run Code Online (Sandbox Code Playgroud)

ios-simulator react-native react-native-ios

101
推荐指数
13
解决办法
5万
查看次数

react-native run-ios --device 在 react-native 之后没有任何反应

在我的设备上运行曾经可以正常工作。然而,突然间,当我运行 react-native run-ios --device 时,我会像这样结束

  • [[真!=真]]

** 构建成功 **

在用户的 iPhone 上安装和启动您的应用程序...

但是,之后没有任何反应,并且该应用程序未安装在我的设备中。

device react-native react-native-ios

5
推荐指数
2
解决办法
5116
查看次数