Xcode 9.3 突然不解析情节提要

Posted

技术标签:

【中文标题】Xcode 9.3 突然不解析情节提要【英文标题】:Xcode 9.3 suddenly not parsing storyboard 【发布时间】:2018-04-15 04:10:43 【问题描述】:

突然 Xcode 9.3 故事板给我一个错误“发生内部错误。编辑功能可能受到限制”

我尝试:

清理项目 删除 DerivedData 禁用 csrutil 将 Mac 更新到最新版本,甚至是 beta 版 更新到 xcode 9.4 beta 我将 xcode 移至应用程序路径 重新安装 CommandLineTools

还有什么可能会出现这个问题?

以下是错误日志:

Version = 9.3 (9E145)
Plugin Version = 14109
Beta Version = 0
OS Version = 10.13.5 (17F35e)



=================================
    ERROR:
=================================

Encountered an error communicating with Interface Builder Cocoa Touch Tool. (Failure reason: Interface Builder Cocoa Touch Tool (-1) failed to launch): Failed to launch Interface Builder Cocoa Touch Tool via CoreSimulator spawn (Failure reason: Failed to spawn Interface Builder Cocoa Touch Tool on IBSimDeviceTypeiPad2x (F29EB89D-17EA-477A-8140-6F7896E208EB, ios 11.3, Booted)): The operation couldn’t be completed. No such file or directory (Failure reason: No such file or directory)

Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with Interface Builder Cocoa Touch Tool." UserInfo=NSLocalizedFailureReason=Interface Builder Cocoa Touch Tool (-1) failed to launch, NSUnderlyingError=0x7f9eba1dddf0 Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo=NSLocalizedFailureReason=Failed to spawn Interface Builder Cocoa Touch Tool on IBSimDeviceTypeiPad2x (F29EB89D-17EA-477A-8140-6F7896E208EB, iOS 11.3, Booted), NSLocalizedDescription=Failed to launch Interface Builder Cocoa Touch Tool via CoreSimulator spawn, NSUnderlyingError=0x7f9eba2cc080 Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory", NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" for further information., NSLocalizedDescription=Encountered an error communicating with Interface Builder Cocoa Touch Tool.



=================================
    TOOL DESCRIPTION:
=================================

<IBCocoaTouchPlatformToolDescription: 0x7f9eb8dddd40> 
| targetRuntime.identifier: IBCocoaTouchFramework-ElevenAndLater
| _roleString: System content
| deviceTypeDescription: <IBScaleFactorDeviceTypeDescription: 0x7f9eba14a320> scaleFactor=2x




=================================
    LAUNCH CONTEXT:
=================================

<IBCocoaTouchToolLaunchContext: 0x7f9eb88dc220> 
| toolDescription.ib_verboseDescription: <IBCocoaTouchPlatformToolDescription: 0x7f9eb8dddd40> 
| | targetRuntime.identifier: IBCocoaTouchFramework-ElevenAndLater
| | _roleString: System content
| | deviceTypeDescription: <IBScaleFactorDeviceTypeDescription: 0x7f9eba14a320> scaleFactor=2x
| 
| launchPath: /Volumes/Data/Download/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool
| frameworkSearchPaths: (
    "/Volumes/Data/Download/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks"
)
| toolName: Interface Builder Cocoa Touch Tool
| platformName: iphonesimulator
| applicationTool: 0
| processIdentifier: -1
| exitStatus: (null)
| signalStatus: (null)




=================================
    EXECUTION CONTEXT:
=================================

<IBSimulatorToolCoreSimulatorBootedCLIExecutionContext: 0x7f9eb84aade0> 
| device: IBSimDeviceTypeiPad2x (F29EB89D-17EA-477A-8140-6F7896E208EB, iOS 11.3, Booted)




=================================
    DEVICE:
=================================

IBSimDeviceTypeiPad2x (F29EB89D-17EA-477A-8140-6F7896E208EB, iOS 11.3, Booted)



=================================
    TOOL MANAGER:
=================================

<IBCocoaTouchToolManager: 0x7f9eb7fc9920>



=================================
    REASON FOR REQUESTING TOOL:
=================================

Preflighting tools for opening document <IBStoryboardDocument: 0x7f9eb2b91a00>: <IBCocoaTouchTargetRuntime: 0x7f9eb7fd0f70>



=================================
    XCODE BACKTRACE:
=================================

  0   +[IBPlatformToolFailureHandler failureHandlerWithContext:failure:diagnosticsHandlerBlock:] (in IDEInterfaceBuilderKit)
  1   +[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_injectDiagnosticsHandlerWithFailureContext:intoError:forLaunchingToolWithError:] (in IDEInterfaceBuilderKit)
  2   +[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_launchNewToolWithLaunchContext:executionContext:toolProxyClass:failureContext:requestingMethod:error:forReason:] (in IDEInterfaceBuilderKit)
  3   __117-[IBAbstractInterfaceBuilderPlatformToolManager asyncLaunchNewToolWithDescription:queue:completionHandler:forReason:]_block_invoke_2 (in IDEInterfaceBuilderKit)
  4   _dispatch_call_block_and_release (in libdispatch.dylib)
  5   _dispatch_client_callout (in libdispatch.dylib)
  6   _dispatch_queue_serial_drain (in libdispatch.dylib)
  7   _dispatch_queue_invoke (in libdispatch.dylib)
  8   _dispatch_root_queue_drain_deferred_wlh (in libdispatch.dylib)
  9   _dispatch_workloop_worker_thread (in libdispatch.dylib)
 10   _pthread_wqthread (in libsystem_pthread.dylib)
 11   start_wqthread (in libsystem_pthread.dylib)




=================================
    SDKS:
=================================

iOS 11.3 (iphoneos11.3):
version = 11.3
platform = com.apple.platform.iphoneos
versionInfo = 
    BuildID = "C689C3CA-2814-11E8-B440-EB6E943B87E0";
    ProductBuildVersion = 15E217;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "11.3";


iOS 11.3 (iphoneos11.3):
version = 11.3
platform = com.apple.platform.iphoneos
versionInfo = 
    BuildID = "C689C3CA-2814-11E8-B440-EB6E943B87E0";
    ProductBuildVersion = 15E217;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "11.3";


Simulator - watchOS 4.3 (watchsimulator4.3):
version = 4.3
platform = com.apple.platform.watchsimulator
versionInfo = 
    BuildID = "4AF39DC2-2782-11E8-A671-639E35235AA8";
    ProductBuildVersion = 15T212;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "4.3";


watchOS 4.3 (watchos4.3):
version = 4.3
platform = com.apple.platform.watchos
versionInfo = 
    BuildID = "4AF39DC2-2782-11E8-A671-639E35235AA8";
    ProductBuildVersion = 15T212;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "4.3";


macOS 10.13 (macosx10.13):
version = 10.13
platform = com.apple.platform.macosx
versionInfo = 
    ProductBuildVersion = 17E189;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Mac OS X";
    ProductUserVisibleVersion = "10.13.4";
    ProductVersion = "10.13.4";


watchOS 4.3 (watchos4.3):
version = 4.3
platform = com.apple.platform.watchos
versionInfo = 
    BuildID = "4AF39DC2-2782-11E8-A671-639E35235AA8";
    ProductBuildVersion = 15T212;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "4.3";


Simulator - iOS 11.3 (iphonesimulator11.3):
version = 11.3
platform = com.apple.platform.iphonesimulator
versionInfo = 
    BuildID = "C689C3CA-2814-11E8-B440-EB6E943B87E0";
    ProductBuildVersion = 15E217;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "11.3";


tvOS 11.3 (appletvos11.3):
version = 11.3
platform = com.apple.platform.appletvos
versionInfo = 
    BuildID = "0618144A-275E-11E8-A65D-05CCCC2CB129";
    ProductBuildVersion = 15L211;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "11.3";


macOS 10.13 (macosx10.13):
version = 10.13
platform = com.apple.platform.macosx
versionInfo = 
    ProductBuildVersion = 17E189;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Mac OS X";
    ProductUserVisibleVersion = "10.13.4";
    ProductVersion = "10.13.4";


Simulator - watchOS 4.3 (watchsimulator4.3):
version = 4.3
platform = com.apple.platform.watchsimulator
versionInfo = 
    BuildID = "4AF39DC2-2782-11E8-A671-639E35235AA8";
    ProductBuildVersion = 15T212;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "4.3";


Simulator - tvOS 11.3 (appletvsimulator11.3):
version = 11.3
platform = com.apple.platform.appletvsimulator
versionInfo = 
    BuildID = "0618144A-275E-11E8-A65D-05CCCC2CB129";
    ProductBuildVersion = 15L211;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "11.3";


Simulator - tvOS 11.3 (appletvsimulator11.3):
version = 11.3
platform = com.apple.platform.appletvsimulator
versionInfo = 
    BuildID = "0618144A-275E-11E8-A65D-05CCCC2CB129";
    ProductBuildVersion = 15L211;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "11.3";


Simulator - iOS 11.3 (iphonesimulator11.3):
version = 11.3
platform = com.apple.platform.iphonesimulator
versionInfo = 
    BuildID = "C689C3CA-2814-11E8-B440-EB6E943B87E0";
    ProductBuildVersion = 15E217;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "11.3";


tvOS 11.3 (appletvos11.3):
version = 11.3
platform = com.apple.platform.appletvos
versionInfo = 
    BuildID = "0618144A-275E-11E8-A65D-05CCCC2CB129";
    ProductBuildVersion = 15L211;
    ProductCopyright = "1983-2018 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "11.3";

【问题讨论】:

您没有做的一件事是尝试重新启动您的 Mac... 见:***.com/questions/24052545/… @l'L'l 我做了 10 多次,我看到所有堆栈溢出问题以及苹果支持 旁注:这是一个完美的例子,说明为什么即使对于单独的项目,每个人都应该使用 Git 等版本控制系统。这样,您可以将更改添加到新分支,然后回滚到之前成功构建的提交,然后验证它是否仍然构建。如果它不再构建,则说明您的 Xcode 或系统有问题。如果它确实构建了,那么您的分支上的提交有问题。 @Smartcat 但这不取决于代码,而是 xcode 问题。我之前在 xcode 9.2 中拥有它,然后当我通过更新 mac 来修复它时,我的代码就像一个魅力。 【参考方案1】:

经过几天的尝试,我刚刚格式化了我的 Mac,xcode 工作正常。

不知道为什么,连我给苹果报告的bug都没有解决!

【讨论】:

以上是关于Xcode 9.3 突然不解析情节提要的主要内容,如果未能解决你的问题,请参考以下文章

Xcode 选项卡栏项目在情节提要中不可见

为啥 XCode 4 在使用情节提要时不创建 XIB 文件?

Xcode 4 不允许我打开在 Xcode 5 中编辑的情节提要

使用 xcode 9.2 的情节提要中的不一致错误

使用情节提要的 Xcode 6.1 OSX 应用程序不呈现窗口或菜单栏

Xcode 11.4。导航的标题颜色从情节提要中变为黑色