错误!无法找到iPhoneSimulator SDK 9.0 RubyMotion

时间:2015-11-25 05:40:02

标签: ios xcode ios-simulator rubymotion

我有Xcode 7.1.1。我已经下载了iPhone 9.0模拟器,但仍然收到此错误。

❯ Rake
    ERROR! Can't locate iPhoneSimulator SDK 9.0 at `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk'

我还在我的Rakefile中添加了sdk 9.0版。

❯ cat Rakefile
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'

begin
  require 'bundler'
  Bundler.require
rescue LoadError
end

Motion::Project::App.setup do |app|
  app.sdk_version = "9.0"
  app.deployment_target = "9.0"
  # Use `rake config' to see complete project settings.
  app.name = 'HelloMotion'
end

我已经下载了iOS 9.0模拟器。您可以在下面的屏幕截图中看到。

pic

2 个答案:

答案 0 :(得分:4)

iOS 9.0 Simulator和iOS 9.0 Simulator SDK是两回事。

旧版iOS模拟器SDK不再附带最新版本的Xcode。要安装较旧的Simulator SDK,请从较旧版本的Xcode(--guess)中取出iPhoneSimulator.sdk目录,然后将其复制到较新版本。

例如,Xcode 7.0附带9.0 iOS模拟器SDK。要在Xcode 7.1中安装它,请访问以下目录:

Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/‌​iPhoneSimulator.sdk

将其从Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk 重命名为iPhoneSimulator.sdk

将其复制到Xcode 7 Simulator SDK目录:

iPhoneSimulator9.0.sdk

在终端中运行Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs 并观察新的模拟器SDK。

答案 1 :(得分:1)

命令xcode-select提供您正在寻找的功能 - 即在多个已安装的Xcode版本之间进行选择。