更新到 6.2 时 Xcode 构建错误

Posted

技术标签:

【中文标题】更新到 6.2 时 Xcode 构建错误【英文标题】:Xcode building error when update to 6.2 【发布时间】:2015-05-31 12:38:00 【问题描述】:

, 错误日志消息如下: UIFont 的一个实例没有解码它之前编码的所有值。 每个人都认为!

CompileStoryboard DVTracker/Base.lproj/Main_iPhone.storyboard
    cd /Users/liuxj/Work/project/dvtracker/ios/DVTracker
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --target-device iphone --target-device ipad --errors --warnings --notices --companion-strings-file zh-Hans:/Users/liuxj/Work/project/dvtracker/ios/DVTracker/DVTracker/zh-Hans.lproj/Main_iPhone.strings --module DVTracker --minimum-deployment-target 6.0 --output-partial-info-plist /Users/liuxj/Library/Developer/Xcode/DerivedData/DVTracker-awbnxxnthwxaadaqqvyyrnigodko/Build/Intermediates/DVTracker.build/Debug-iphoneos/DVTracker.build/Main_iPhone-SBPartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compilation-directory /Users/liuxj/Library/Developer/Xcode/DerivedData/DVTracker-awbnxxnthwxaadaqqvyyrnigodko/Build/Products/Debug-iphoneos/DVTracker.app/Base.lproj /Users/liuxj/Work/project/dvtracker/ios/DVTracker/DVTracker/Base.lproj/Main_iPhone.storyboard

2015-03-27 16:14:54.398 Interface Builder Cocoa Touch Tool[9112:195579] *** Assertion failure in -[IBBinaryUnarchiver decodeObject], /SourceCache/IBAutolayoutFoundationIOS/IDEInterfaceBuilder-6751/Foundation/Utilities/IBBinaryUnarchiver.m:217
2015-03-27 16:14:54.787 ibtoold[9075:195421] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6751/InterfaceBuilderKit/Utilities/IBAbstractMessageChannelInterfaceBuilderToolProxy.m:40
Details:  Failed to compile nib consisting of IBProxyObject, IBProxyObject, IBProxyObject, IBUIBarButtonItem, IBUIBarButtonItem, IBUIImageView, IBUINavigationBar, IBUINavigationItem, IBUITableView, IBUIToolbar, IBUIView, and IBUIView.

与 Interface Builder Cocoa Touch Tool 通信时遇到错误。如果您选择为此问题提交崩溃报告或 Radar,请查看 Console.app 以获取“Interface Builder Cocoa Touch Tool”的崩溃报告,并将其内容包含在您的崩溃报告中。

Exception name: NSInternalInconsistencyException
Exception reason: An instance of UIFont did not decode all of the values it previously encoded.
Exception backtrace:
  0. CoreFoundation           0x000000011067ea5d __exceptionPreprocess
  1. libobjc.A.dylib          0x000000010f389bb7 objc_exception_throw
  2. CoreFoundation           0x000000011067e8da +
  3. Foundation               0x000000010efa2b6f -
  4. IBFoundation             0x000000010eb27270 -
  5. IBFoundation             0x000000010eb2219c -
  6. IBFoundation             0x000000010eb21201 +
  7. IBFoundation             0x000000010eb271bf -
  8. IBFoundation             0x000000010eb217fd -
  9. IBFoundation             0x000000010eb21201 +
 10. IBFoundation             0x000000010eb271bf -
 11. IBFoundation             0x000000010eb2219c -
 12. IBFoundation             0x000000010eb21201 +
 13. IBFoundation             0x000000010eb271bf -
 14. IBFoundation             0x000000010eb217fd -
 15. IBFoundation             0x000000010eb21201 +
 16. IBFoundation             0x000000010eb271bf -
 17. IBFoundation             0x000000010eb2219c -
 18. IBFoundation             0x000000010eb21201 +
 19. IBFoundation             0x000000010eb271bf -
 20. IBFoundation             0x000000010eba31bc -
 21. IBFoundation             0x000000010eba2ec0 __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke
 22. libdispatch.dylib        0x0000000113c9b964 _dispatch_client_callout
 23. libdispatch.dylib        0x0000000113c88818 _dispatch_barrier_sync_f_slow_invoke
 24. libdispatch.dylib        0x0000000113c9b964 _dispatch_client_callout
 25. libdispatch.dylib        0x0000000113c86a59 _dispatch_main_queue_callback_4CF
 26. CoreFoundation           0x00000001105e6749 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
 27. CoreFoundation           0x00000001105a962b __CFRunLoopRun
 28. CoreFoundation           0x00000001105a8bc6 CFRunLoopRunSpecific
 29. Foundation               0x000000010ef430d2 -
 30. IBFoundation             0x000000010eb81a43 -
 31. IBFoundation             0x000000010eb81bcf -
 32. IBFoundation             0x000000010eb81e92 +
 33. ???                      0x000000010ce11bc7 ???
 34. libdyld.dylib            0x0000000113ccc145 start
Exception info:


Function: void IBAssertMarshallingFailure(NSString *__strong, NSString *__strong, NSString *__strong)
Thread:   <NSThread: 0x7fcba0d40fd0>number = 1, name = main
Hints: None
Backtrace:
  0  0x0000000102275a84 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1  0x000000010227521b _DVTAssertionHandler (in DVTFoundation)
  2  0x000000010227547e _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x0000000103164203 IBAssertMarshallingFailure (in IDEInterfaceBuilderKit)
  4  0x0000000108c88341 (in IDEInterfaceBuilderCocoaTouchIntegration)
  5  0x0000000108c88f42 (in IDEInterfaceBuilderCocoaTouchIntegration)
  6  0x0000000103103b73 -[IBDocumentCompiler invokeWhileUsingSourceAsIntermediateDocument:] (in IDEInterfaceBuilderKit)
  7  0x0000000103103e84 -[IBDocumentCompiler invokeWithIntermediateDocumentOfTargetRuntime:alwaysCopy:block:] (in IDEInterfaceBuilderKit)
  8  0x0000000108c88747 (in IDEInterfaceBuilderCocoaTouchIntegration)
  9  0x0000000108c76bc2 (in IDEInterfaceBuilderCocoaTouchIntegration)
 10  0x0000000103303ce2 -[IBStoryboardSceneCompilationGroup compilationResultsForCompilationUnits:options:returningErrors:] (in IDEInterfaceBuilderKit)
 11  0x00000001032f4bdc -[IBStoryboardDocumentCompiler compileUnitsFromCompilationGroups:filter:options:errors:] (in IDEInterfaceBuilderKit)
 12  0x00000001032f5ea3 __78-[IBStoryboardDocumentCompiler compileContentsOfStoryboardWithOptions:errors:]_block_invoke (in IDEInterfaceBuilderKit)
 13  0x00000001031d061f IBWithAutoInvalidationPool (in IDEInterfaceBuilderKit)
 14  0x00000001032f5c48 -[IBStoryboardDocumentCompiler compileContentsOfStoryboardWithOptions:errors:] (in IDEInterfaceBuilderKit)
 15  0x00000001032f6236 -[IBStoryboardDocumentCompiler internalCompileWithOptions:error:] (in IDEInterfaceBuilderKit)
 16  0x0000000108c76dd4 (in IDEInterfaceBuilderCocoaTouchIntegration)
 17  0x00000001032f6b70 __57-[IBStoryboardDocumentCompiler compileWithOptions:error:]_block_invoke (in IDEInterfaceBuilderKit)
 18  0x0000000103103c90 -[IBDocumentCompiler invokeWithIntermediateDocument:] (in IDEInterfaceBuilderKit)
 19  0x0000000103103e34 -[IBDocumentCompiler invokeWithIntermediateDocumentOfTargetRuntime:alwaysCopy:block:] (in IDEInterfaceBuilderKit)
 20  0x00000001032f6816 -[IBStoryboardDocumentCompiler compileWithOptions:error:] (in IDEInterfaceBuilderKit)
 21  0x0000000103104017 +[IBDocumentCompiler compileContentsOfDocument:options:error:] (in IDEInterfaceBuilderKit)
 22  0x00000001030bee13 __47-[IBDocument compiledPackageWithOptions:error:]_block_invoke (in IDEInterfaceBuilderKit)
 23  0x00000001030f7585 -[IBDocumentAutolayoutManager assertIfArbitrationIsScheduledDuring:] (in IDEInterfaceBuilderKit)
 24  0x00000001030bed67 -[IBDocument compiledPackageWithOptions:error:] (in IDEInterfaceBuilderKit)
 25  0x0000000102085ec1 (in ibtoold)
 26  0x0000000102082a57 (in ibtoold)
 27  0x0000000102085321 (in ibtoold)
 28  0x000000010208b227 (in ibtoold)
 29  0x000000010208b777 (in ibtoold)
 30  0x000000010208b647 (in ibtoold)
 31  0x000000010207a44f (in ibtoold)
 32  0x000000010208ae11 (in ibtoold)
 33  0x000000010208a068 (in ibtoold)
 34  0x00007fff809de5c9 start (in libdyld.dylib)
 35  0x0000000000000002
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255

【问题讨论】:

【参考方案1】:

这个问题解决了。 发生错误是因为导航栏标题字体设置为标题,在 Source Code 中: &lt;fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/&gt; 诠释 Xcode 6.1, 但是在 Xcode 6.2、6.4、7.0 中,会导致编译错误。

对不起我的英语。

【讨论】:

以上是关于更新到 6.2 时 Xcode 构建错误的主要内容,如果未能解决你的问题,请参考以下文章

xcode更新从不同分支构建的PCH文件后的问题[重复]

使用版本 Xcode 11.4 构建 Xcode 项目时反复出错

Xcode 11 GM - 错误:访问构建数据库 - 磁盘 I/O 错误

Xcode 10 构建错误 - 多个命令产生 info.plist

发布构建崩溃、Swift、Armchair 框架、Xcode 6.2

构建错误:升级到 Xcode 10 后找不到 FBSDKShareKit.h 文件