Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
496 views
in Technique[技术] by (71.8m points)

ios7 - New Xcode 6 Project - How to run in the iOS 7 Simulator

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. Set Project's iOS Deployment Target to 7.0
  2. Referenced a Launch Image Source in the Assets

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

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

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

How I can make a new project run in the iOS 7 simulator?

EDIT

The output of xcrun simctl list is the following:

== 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)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I meet this problem too.

  1. Preferences -> Downloads -> Components
  2. Then click the download button.

    • If you've downloaded them before, Xcode will install them directly.

Maybe you've just update your Xcode. Xcode 6 is not installed 7.x simulators as default. However, you installed them on previous version Xcode.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...