繁体   English   中英

无法从Xcode 5.1运行iOS模拟器

[英]Can't run iOS simulator from Xcode 5.1

我刚刚安装了Xcode 5.1。 由于安装了多个版本,因此将其放在/Applications/Xcode51.app并建立了动态​​链接/Applications/Xcode.app -> /Applications/Xcode51.app

我运行了xcode-select,现在显示了正确的路径:

> xcode-select --print-path
/Applications/Xcode51.app/Contents/Developer

通过运行确认:

> gcc --version
Configured with: --prefix=/Applications/Xcode51.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

我可以编译osx应用程序而没有任何问题,但是当我尝试为新项目助手生成的iOS运行一个简单的骨架项目时,我得到:

dyld: Library not loaded: @rpath/IBFoundation.framework/Versions/A/IBFoundation
  Referenced from: /Applications/Xcode51.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtoold
  Reason: image not found
Command /Applications/Xcode51.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 5

如果我从聚光灯下运行模拟器,则会遇到相同的问题,但使用SimulatorHost.framework

如果我做:

export DYLD_FRAMEWORK_PATH=/Applications/Xcode51.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/
open /Applications/Xcode51.app/Contents/Applications/iPhone\ Simulator.app

然后,我设法使其运行。

如何设置此路径,以便模拟器也可以从Xcode运行?

我设法通过从Appstore安装Xcode而不是使用developer.apple.com上提供的dmg使其工作。

我先在模拟器中运行了一个简单的iphone项目,同时保留了默认的安装目录(/Applications/Xcode.app)。 然后我将其移至/Applications/Xcode511.app,进行了符号链接并运行xcode-select,该项目仍在正确构建。

我不知道.dmg出了什么问题。 我注意到的唯一区别是Xcode要求在首次运行时安装其他组件,而当我从dmg运行它时并没有要求。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM