[英]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.