簡體   English   中英

打開Storyboard時出現Xcode崩潰

[英]Xcode Crash on opening Storyboard

為了支持從iOS 7到iOS 9的iOS,我安裝了Xcode 6和7.然后我在Xcode 7上為iPhone創建了一個項目。我在Xcode 6上打開它以在iPhone模擬器7上進行測試。

但是當我點擊Storyboard文件時,Xcode 6崩潰了。

我該如何解決? 或者還有另一種方式來支持iOS版本?


錯誤信息

Process:               Xcode [9928]
Path:                  /Applications/Xcode 6.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               6.4 (7720)
Build Info:            IDEFrameworks-7720000000000000~8
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [9928]
User ID:               501

Date/Time:             2016-01-04 01:15:21.068 +0900
OS Version:            Mac OS X 10.10.5 (14F1509)
Report Version:        11
Anonymous UUID:        F02C76F0-B69A-FE68-DD89-9946A7C82C03

Sleep/Wake UUID:       2BF55735-0241-43B3-A731-49B6D645DC4F

Time Awake Since Boot: 53000 seconds
Time Since Wake:       550 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 6E35b
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-7703/InterfaceBuilder/Utilities/IBObjectMarshalling.m:45
Details:  Failed to launch Interface Builder Cocoa Touch Tool: Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with Interface Builder WatchKit Tool." UserInfo=0x7fb9b3128d40 {NSUnderlyingError=0x7fb9ac00c620 "Failed to communicate with Interface Builder", NSLocalizedDescription=Encountered an error communicating with Interface Builder WatchKit Tool., NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "Interface Builder WatchKit Tool" for further information., NSLocalizedFailureReason=Interface Builder WatchKit Tool (10069) failed to launch and exited with status (null), signal 5.



Dyld Error Message:
  Library not loaded: /System/Library/PrivateFrameworks/PepperUICore.framework/PepperUICore
  Referenced from: /Applications/Xcode 6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder WatchKit Tool
  Reason: image not found


Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_FRAMEWORK_PATH=/Applications/Xcode 6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays
DYLD_LIBRARY_PATH=
DYLD_FALLBACK_LIBRARY_PATH=
DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.0.simruntime/Contents/Resources/RuntimeRoot
}

原因是Xcode 6和7之間存在沖突.Apple在Xcode 7的發行說明中對此進行了揭示。

我按照步驟操作,錯誤得到解決。

“從Xcode的下載首選項安裝iOS 9.0 Simulator Runtime會導致Xcode 6中的Interface Builder安裝在同一台機器上以停止運行。要么避免安裝iOS 9.0 Simulator Runtime,要么移動/ Library / Developer / CoreSimulator / Profiles / Runtimes / iOS \\切換到Xcode 6時將9.0.simruntime更改為備份位置,然后將其移回Xcode 7(23230951)“

https://developer.apple.com/library/watchos/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc7_release_notes.html

得到同樣的問題,經過一些調查,似乎在Xcode更新或Mac OS更新后,從系統庫, PepperUICore.framework和SockPuppetGizmo.framework中刪除了2個私有框架。 但您仍然可以在Xcode 6模擬器SDK中找到它們。

確保在/ System / Library / PrivateFramework /中找不到這兩個框架。 然后使用下面的命令行(用你的Xcode 6 app路徑替換)將私有框架從Xcode 6模擬器SDK復制到你的/ System / Library / PrivateFramework /

sudo cp -r /Applications/Xcode6.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PepperUICore.framework /System/Library/PrivateFrameworks/

sudo cp -r /Applications/Xcode6.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/SockPuppetGizmo.framework /System/Library/PrivateFrameworks/

現在用Xcode 6打開.xib或.storyboard,它應該沒問題。

嘗試更改故事板檢查器中的“打開”屬性,使其與Xcode 6或6.3兼容。

特別是這個下拉/彈出菜單項:

在此輸入圖像描述

但是像Kaizoku評論一樣,如果其他東西被打破(例如,如果您的應用程序期望僅在iOS 9中存在的符號或功能),請不要感到驚訝。

可能更好的是為您的應用設置最低部署版本 (例如,到iOS 7),並在iOS 7或iOS 8模擬器中試用,您可以使用Xcode 7下載

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM