Xcode 打开情节提要时崩溃

Xcode Crash on opening Storyboard

为了在 iOS 7 到 iOS 9 范围内支持 iOS,我安装了 Xcode 6 和 7。 然后我在 Xcode 7 上为 iPhone 创建了一个项目。 我在 Xcode 6 上打开它以在 iPhone 模拟器 7 上进行测试。

但是 Xcode 当我点击 Storyboard 文件时 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
}

尝试更改故事板检查器中的 "Opens In" 属性,使其与 Xcode 6 或 6.3 兼容。

特别是这个下拉/弹出菜单项:

但是就像 Kaizoku 的评论一样,如果其他地方出现问题也不要感到惊讶(例如,如果您的应用需要仅存在于 iOS 9 中的符号或功能)。

可能更好的是set the minimum deployment version for your app (e.g. to iOS 7) and

原因是Xcode6和7冲突。 Apple 在 Xcode 7.

的发行说明中揭示了它

我按照步骤操作,错误已解决。

“从 Xcode 的下载首选项安装 iOS 9.0 Simulator Runtime 可能会导致 Xcode 6 安装在同一台机器上的 Interface Builder 停止运行。 要么避免安装 iOS 9.0 Simulator Runtime,要么在切换到 Xcode 6 时将 /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 9.0.simruntime 移动到备份位置,然后将其移回 Xcode 7. (23230951)"

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

遇到同样的问题,经过一番调查,似乎在 Xcode 更新或 Mac OS 更新后,系统库中删除了 2 个私有框架,PepperUICore.framework 和 SockPuppetGizmo.framework。但是您仍然可以在 Xcode 6 模拟器 SDK 中找到它们。

确保在 /System/Library/PrivateFramework/ 中找不到这两个框架。然后使用下面的命令行(将 Xcode 6 应用程序路径替换为您的应用程序路径)将私有框架从 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/

现在用 Xcode6 打开你的 .xib 或 .storyboard,应该没问题。