简体   繁体   中英

Can't run iOS simulator from Xcode 5.1

I just installed Xcode 5.1. Since I have several versions installed, I put it in /Applications/Xcode51.app and made a dynamic link /Applications/Xcode.app -> /Applications/Xcode51.app

I ran xcode-select, which now shows the proper path:

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

Which is confirmed by running:

> 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

I can compile osx applications without any problems, but when I try to run a simple skeleton project for iOS generated by the new project assistant, I get:

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

If I run the simulator from spotlight, I get the same problem, but with SimulatorHost.framework .

If I do:

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

Then I manage to get it to run.

How can I set this path so that the simulator can run from Xcode as well?

I managed to make it work by installing Xcode from the appstore instead of using the dmg provided on developer.apple.com ...

I ran a simple iphone project in simulator first while keeping the default install directory (/Applications/Xcode.app). Then I moved it to /Applications/Xcode511.app, made a symbolic link and ran xcode-select, and the project was still building properly.

I don't know what went wrong with the .dmg. The only difference I noticed is Xcode asking to install additional components on first run, which it didn't ask when I ran it from the dmg.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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