Could not find iPhone 6 simulator

最近原来的老项目有点问题需要处理一下,运行启动命令,就报了如下错误,提示找不到iPhone 6 模拟器。

react-native run-ios

Owaiss-Mac:pdm owaisahmed$ react-native run-ios
Found Xcode project pdm.xcodeproj

Could not find iPhone 6 simulator

Error: Could not find iPhone 6 simulator
    at resolve (/Users/fantuan/Documents/react-native-projects/pdm/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
    at new Promise (<anonymous>)
    at runOnSimulator (/Users/fantuan/Documents/react-native-projects/pdm/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
    at Object.runIOS [as func] (/Users/fantuan/Documents/react-native-projects/pdm/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
    at Promise.resolve.then (/Users/fantuan/Documents/react-native-projects/pdm/node_modules/react-native/local-cli/cliEntry.js:117:22)

老项目是一年前的当时项目的的版本时还是0.57,期间工作电脑的系统版本升级到了10.14.6, XCode的版本也升级到了10.3,使用如下命令可以查看当前项目的具体环境信息:

React Native Environment Info:
    System:
      OS: macOS 10.14.6
      CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 26.40 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.14.1 - ~/.nvm/versions/node/v10.14.1/bin/node
      Yarn: 1.13.0 - ~/.nvm/versions/node/v10.14.1/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.14.1/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
      Android SDK:
        API Levels: 23, 25, 26, 27, 28, 29
        Build Tools: 23.0.1, 23.0.3, 25.0.2, 25.0.3, 26.0.3, 27.0.3, 28.0.0, 28.0.2, 28.0.3, 29.0.2
        System Images: android-23 | Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-create-library: 3.1.2

经过一番查阅资料发现是Xcode的版本升级到10导致的。
解决方案如下:
1.打开项目node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js文件
2.修改文件的第31行

if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
  continue;
}

为如下代码

if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS')
    && !version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS')) {
  continue;
}

吐血注意:
对于ReactNative项目开发中,请不要轻易升级Xcode等编译,除非你十分精通。

欢迎大家关注我的公众号:君伟说,定期推送开发技术。

原文地址:https://www.cnblogs.com/wayne6688/p/12195967.html

时间: 2024-11-13 06:07:58

Could not find iPhone 6 simulator的相关文章

Could not find iPhone X simulator

Could not find iPhone X simulator Error: Could not find iPhone X simulator at resolve (/Users/zhouenxiao/Desktop/MeiTuan/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13) at new Promise (<anonymous>) at runOnSimulator (/Users/zhouenxiao/D

REMOVE ONCLICK DELAY ON WEBKIT FOR IPHONE

Developing on the webkit for iPhone I encountered a curious delay ononClick events. It seems that the click is triggered with about 300 milliseconds delay. While this is unnoticeable on a standard web page, it can be annoying on a web application. Fo

webrtc教程

cdsn博客不支持word文件,所以这里显示不完全.可到本人资源中下载word文档: v0.3:http://download.csdn.net/detail/kl222/6961491 v0.1:http://download.csdn.net/detail/kl222/6677635  下载完后评论,可以返还你的积分.此文档还在完善中,欢迎大家交流,共同完善.    Webrtc  教程 版本0.3(2014年2月) 康林 ([email protected]) 本文博客地址:http://

missing required architecture

warning: ignoring file ../libBaiduMobStat.a, missing required architecture i386 in file ../libBaiduMobStat.a (3 slices) 可能原因:正如这个错误提示所指出的那样,缺少了i386架构的东西.这很可能是由于项目中包含的静态库是被编译用于真机测试的,大家都知道苹果手机cpu是arm架构,而mac笔记本(当然也包括运行于其上的iphone-simulator)是intel架构.所以当这个

iOS-联系人应用(一)

环境:xcode6,iphone 4s simulator with iOS8.0 一.功能界面介绍 1.1 应用启动进入联系人列表页面,数据为模拟数据,来源与一个plist文件: 1.2 点击右上角当+按钮时,进入添加页面,页面跳转采用UINavigationController,该页面上左上角当取消按钮直接导航至起始页面,完成则添加数据至表格: 1.3 当点击一行时,把数据设置至添加页面,用户可编辑(后期可优化为点击一行进入详情页面,再详情页面点击编辑再进入编辑模式): 二.功能实现 2.1

OpenGL ES2 缩放移动

OpenGL ES Transformations with Gestures Ricardo Rendon Cepeda on December 10, 2013 Tweet Gestures: Intuitive, sophisticated and easy to implement! In this tutorial, you’ll learn how to use gestures to control OpenGL ES transformations by building a s

xcode工程编译错误:missing required architecture i386 解决方法

可能原因一:项目内保存了.framework文件,在复制分发到不同计算机的时候可能会引发该错误 解决方法一:来到Targets->Build Settings->Framework Search Paths,将其内容删除.让xcode不管项目目录下的.framework文件,而是去包含本机的.当然你也可以手动删除它们. 解决方法二:这个是在stack overflow上看到的: I had this same problem, and the solution turned out to be

IOS之constraints

anyway, you can do this with auto layout. You can do it entirely in IB as of Xcode 5.1. Let's start with some views: The light green view has an aspect ratio of 4:1. The dark green view has an aspect ratio of 1:4. I'm going to set up constraints so t

Windows平台软件推荐:神器小工具(骨灰级)

底层工具 "If you know how to use Process Monitor competently, people of both sexes will immediately find you more attractive." – Scott Hanselman Ultimate Boot CD 和 Ultimate Boot CD for Windows  – 这些光盘是程序员修电脑时的必备工具,毕竟你可没那么多钱给给每个电脑坏掉的亲戚买新机,不是么? Hiren'