新的Xcode 6项目 - 如何在iOS 7模拟器中运行 [英] New Xcode 6 Project - How to run in the iOS 7 Simulator

查看:111
本文介绍了新的Xcode 6项目 - 如何在iOS 7模拟器中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Xcode 6创建一个也在iOS 7上运行的新项目。我创建了一个新项目,然后执行了以下操作:

I try to create a new project with Xcode 6 that also runs on iOS 7. I've created a new project and then did the following:


  1. 将Project的iOS部署目标设置为7.0

  2. 在资产中引用启动图像源

但是,当尝试在iOS 7模拟器上运行时,会显示以下错误:

Still, when trying to run on an iOS 7 simulator, the following error is shown:

iPhone 5s不可用。请选择其他设备并尝试再次。

"iPhone 5s not available. Please select a different device and try again."

(我的旧项目在iOS 7模拟器上正常运行。)

(My older projects run fine on iOS 7 simulators.)

我是怎么做的可以在iOS 7模拟器中运行新项目吗?

编辑

xcrun simctl list 的输出如下:

== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone)
Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad)
== Runtimes ==
iOS 7.0 (7.0 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-0) (unavailable, runtime path not found)
iOS 7.1 (7.1 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-1) (unavailable, runtime path not found)
iOS 8.0 (8.0 - 12A365) (com.apple.CoreSimulator.SimRuntime.iOS-8-0)
== Devices ==
-- iOS 7.0 --
    iPhone 4s (9A55186B-9B91-4526-A2AB-EF0C49F592A4) (Shutdown) (unavailable)
    iPhone 5 (D326EE14-21DA-4FA5-A229-F0BACDA6C9F3) (Shutdown) (unavailable)
    iPhone 5s (1AC03181-38D5-4C24-9928-4EFDE83D0ACD) (Shutdown) (unavailable)
    iPad 2 (212A00A7-1D1F-4392-8AE6-24C46EA9A507) (Shutdown) (unavailable)
    iPad Retina (9471D6C8-DDE7-4D08-B015-89CA02ED4C46) (Shutdown) (unavailable)
    iPad Air (E84ADD9C-7BA4-4EBF-B98E-DB6EAF99EFA6) (Shutdown) (unavailable)
-- iOS 7.1 --
    iPhone 4s (836A9B30-D104-4D54-98A2-479F7F35F4EC) (Shutdown) (unavailable)
    iPhone 5 (39EB7E74-4665-492B-9097-F454D083CFD8) (Shutdown) (unavailable)
    iPhone 5s (DAE6E1F3-E4F1-4D4F-9C16-73B495A08415) (Shutdown) (unavailable)
    iPad 2 (D34D496D-39CA-4D2E-9C6A-C5EB7B62C8DC) (Shutdown) (unavailable)
    iPad Retina (8EFF2BF2-F639-46C2-AB21-8B28858DF778) (Shutdown) (unavailable)
    iPad Air (434AB478-DD08-481D-A75D-3EA94A440814) (Shutdown) (unavailable)
-- iOS 8.0 --
    iPhone 4s (EEAA9E7C-867E-4E71-99CE-A5C729FB2F21) (Shutdown)
    iPhone 5 (DA90266D-1FF5-4E84-B806-DBE49F1A86DB) (Shutdown)
    iPhone 5s (B673A5D8-7992-41AE-9B43-200C064ECFDA) (Shutdown)
    iPhone 6 Plus (19F9C682-B4D8-488B-82C4-8B5BAD8D38FB) (Shutdown)
    iPhone 6 (2FCC7DD6-2274-4B7F-A151-1A49AB31AE65) (Booted)
    iPad 2 (801852DD-7EFA-4336-9686-42C5D65DAABD) (Shutdown)
    iPad Retina (314D3C76-6D20-466B-AD61-567CE202556F) (Shutdown)
    iPad Air (5B47FA82-F1F6-43C2-A373-BABBEFA0AB22) (Shutdown)
    Resizable iPhone (8F4B8FAF-AEB9-4782-AC09-6F8B4BDD37AA) (Shutdown)
    Resizable iPad (DEBDB255-8650-4B8D-B161-D9FA26331ACD) (Shutdown)


推荐答案

在设备窗口中,全部删除设备一个接一个。现在逐个添加它们。现在重新启动计算机(不仅仅是Xcode)。这将使您只有好的设备,并且您将知道是否需要下载旧的模拟器。

In the Devices window, delete all devices one by one. Now add them back one by one. Now restart the computer (not just Xcode). This will leave you with only good devices and you'll know whether you need to download the older simulators.

这篇关于新的Xcode 6项目 - 如何在iOS 7模拟器中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆