在以下环境中:

Xcode 8.3.2
react-native-cli 2.0.1
react-native: 0.44.0
macOS Sierra 10.12.5

刚刚更新了Xcode和macOS以运行React Native并像几天前一样继续练习...但每次我try run 时:

react-native run-ios

我得到了一个错误:

Scanning 555 folders for symlinks in /Users/juangarcia/projects/react-tests/CountDown/node_modules (6ms)
Found Xcode project CountDown.xcodeproj

Could not find iPhone 6 simulator

我试图查看可用设备的列表,我得到:

~/projects/react-tests/CountDownSample » xcrun simctl list devices
== Devices ==
-- iOS 10.3 --
-- tvOS 10.2 --
    Apple TV 1080p (323FA90C-0366-4B5B-AEEE-D0477C61762A) (Shutdown)
-- watchOS 3.2 --
    Apple Watch - 38mm (F42C0C0D-325B-41DD-948D-E44B0A08B951) (Shutdown)
    Apple Watch - 42mm (75D8BAF1-27CB-47EE-9EE3-D400B962F8BC) (Shutdown)
    Apple Watch Series 2 - 38mm (64D01BD4-5C37-4885-A73A-52479D9CCF4F) (Shutdown)
    Apple Watch Series 2 - 42mm (8471C9FD-BCF3-4DDC-B386-F17E128C5EB1) (Shutdown)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-3 --
    iPhone 4s (1FF2D0D3-F136-43A7-8148-7B1849A7B1E3) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5 (859D4D90-F1B5-4DE8-B976-6984F85CAFE3) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (5B2AD8CD-9B3F-413C-BF16-FA96F807BB2B) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 (2573D214-4371-47A8-BFF6-3341862954E0) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 Plus (8916CD9B-4D8B-463F-8583-75A2CE4F61FD) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s (41093980-7912-4F98-9D06-981A533FAAFE) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s Plus (6A85D2AE-D867-4341-979C-FEE8308DE93E) (Shutdown) (unavailable, runtime profile not found)
    iPad 2 (BFBB5477-B6D9-48C3-B529-516D2D9105A7) (Shutdown) (unavailable, runtime profile not found)
    iPad Retina (C49B5920-F4FF-4D7F-AA74-7AE2367FF09D) (Shutdown) (unavailable, runtime profile not found)
    iPad Air (4101FC8E-D8B9-4496-AD2B-1484661C15DE) (Shutdown) (unavailable, runtime profile not found)
    iPad Air 2 (9952B05C-829F-428F-AC76-EB1F8FB55D72) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (735082E2-4470-4D9A-BAA1-BEDA8426B725) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-9-2 --
    Apple TV 1080p (AD48DE24-6295-4EFC-9787-A9B5D8118503) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-2-2 --
    Apple Watch - 38mm (C3F2A7C3-3967-4159-9B79-13CBA63E399E) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch - 42mm (656005A9-7555-4872-A7FB-FB6BCB65139C) (Shutdown) (unavailable, runtime profile not found)

react默认使用Iphone 6,但不可用

how can I make it available again? and why did this happen?

推荐答案

这比预期的要简单...在安装SO和Xcode时,由于某种原因,删除的所有设备列表...在本例中,进入Xcode UI菜单添加一个新的模拟器iPhone 6就足够了...我试着重新启动并返回,所以我不知道UI中有一个选项,因为我是XCode环境的新手.谢谢你的回答.

In the XCode menu, Window --> Devices --> Add the new simulator...

React-native相关问答推荐

在原生react 中更改图像源URI时闪烁

如何在Reaction本地日历中 Select 年份?

如何在react-native 的switch 内显示文本(是/否)

如何在react-navigation 中将drawer抽屉放在标题上?

react平面列表渲染项

Javascript setTimeout 立即在 React Native 中运行

无法在 React Native iOS 模拟器中按 URI 显示图像

'React native run android' 在模拟器中启动应用程序后立即停止

获取没有地理位置 API React-native 的国家/城市?

使用条码 scanner 掩码的透明视图react-native相机

更新 this.state.dataSource 不会更新 ListView

如何在 Expo 和 React Native 中使用绝对路径导入?

如何在react-native矢量图标中从多个文件导入图标?

TypeError : props.navigation.getParam 不是函数. In(props.navigation.getParam('name')

在 webview 中检测touch 是 Apple Pencil 还是手指(react-native)

居中图像 React Native 加载屏幕

如何在android studio中导入react native元素

使用 React Native 运行 Firebase 3.0 时出错

React Native <>(空)组件到底是什么

如何更改后退按钮标签,react-navigation