1

ストーリーボード ファイルは、Xcode を 6.3 にアップグレードした後、以前は Xcode6.0 で作成されていました。コンパイル エラーは、あいまいなエラー メッセージで飛び出します。検索に何時間も費やしましたが、問題のあるアイテムがストーリーボード ファイルのどこにあるのか正確にはわかりません。

お時間やご提案など、よろしくお願いいたします。

以下は、完全なエラー メッセージです。

    nwi_state: registration failed (1000000)
    2015-04-11 09:01:43.783 Interface Builder Cocoa Touch Tool[11220:234260] ***storageTaskManagerExistsWithIdentifier:withIdentifier failed: Error Domain=NSCocoaErrorDomain Code=4099 "The operation couldn’t be completed. (Cocoa error 4099.)" (The connection to service named com.apple.nsurlstorage-cache was invalidated.) UserInfo=0x7ffb92e2b7b0 {NSDebugDescription=The connection to service named com.apple.nsurlstorage-cache was invalidated.};
    {NSDebugDescription = "The connection to service named com.apple.nsurlstorage-cache was invalidated.";}
    nwi_state: registration failed (1000000)
    2015-04-11 09:01:55.387 Interface Builder Cocoa Touch Tool[11225:234925] ***storageTaskManagerExistsWithIdentifier:withIdentifier failed: Error Domain=NSCocoaErrorDomain Code=4099 "The operation couldn’t be completed. (Cocoa error 4099.)" (The connection to service named com.apple.nsurlstorage-cache was invalidated.) UserInfo=0x7fac79702450 {NSDebugDescription=The connection to service named com.apple.nsurlstorage-cache was invalidated.}; {
NSDebugDescription = "The connection to service named com.apple.nsurlstorage-cache was invalidated.";}
    2015-04-11 09:02:06.649 ibtoold[11212:234105] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-7531/InterfaceBuilderKit/Utilities/IBAbstractMessageChannelInterfaceBuilderToolProxy.m:38
    Details:  Failed to compile nib consisting of IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBProxyObject, IBProxyObject, IBUIImageView, IBUILabel, IBUILabel, IBUITableViewCell, IBUITableViewCellContentView, and IBUITextView.

    Encountered an error communicating with Interface Builder Cocoa Touch Tool. If you choose to file a crash report or Radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.

    Exception name: NSInvalidArgumentException
    Exception reason: *** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs
    Exception backtrace:
      0. CoreFoundation           0x000000010b92fc4d __exceptionPreprocess
      1. libobjc.A.dylib          0x000000010a6cebb7 objc_exception_throw
      2. CoreFoundation           0x000000010b92fb9d +
      3. Foundation               0x000000010a3f7233 VerifyConstraintArguments
      4. Foundation               0x000000010a260a5a +
      5. IBAutolayoutFoundation   0x0000000109ddaebc -
      6. IBCocoaTouchToolFoundation 0x00000001081fb977 -
      7. IBCocoaTouchToolFoundation 0x000000010821713b -
      8. IBCocoaTouchToolFoundation 0x00000001081f18b8 -
      9. IBFoundation             0x0000000109efe549 __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke
     10. IBFoundation             0x0000000109efe2a6 -
     11. IBFoundation             0x0000000109efdf90 __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke
     12. libdispatch.dylib        0x000000010eeec964 _dispatch_client_callout
     13. libdispatch.dylib        0x000000010eed9818 _dispatch_barrier_sync_f_slow_invoke
     14. libdispatch.dylib        0x000000010eeec964 _dispatch_client_callout
     15. libdispatch.dylib        0x000000010eed7a59 _dispatch_main_queue_callback_4CF
     16. CoreFoundation           0x000000010b8971f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
     17. CoreFoundation           0x000000010b858dcb __CFRunLoopRun
     18. CoreFoundation           0x000000010b858366 CFRunLoopRunSpecific
     19. Foundation               0x000000010a284f92 -
     20. IBFoundation             0x0000000109edcc20 -
     21. IBFoundation             0x0000000109edcdaf -
     22. IBFoundation             0x0000000109edd072 +
     23. ???                      0x0000000108177be7 ???
     24. libdyld.dylib            0x000000010ef1c145 start
    Exception info:{
    }

    Function: __IBAssertMarshallingFailureWithUniqueBacktrace_block_invoke
    Thread:   <NSThread: 0x7fc88b104020>{number = 1, name = main}
    Hints: None
    Backtrace:
      0  0x0000000104b3f4a1 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
      1  0x0000000104b3ec3b _DVTAssertionHandler (in DVTFoundation)
      2  0x0000000104b3ee9e _DVTAssertionFailureHandler (in DVTFoundation)
      3  0x0000000105a685e8 __IBAssertMarshallingFailureWithUniqueBacktrace_block_invoke (in IDEInterfaceBuilderKit)
      4  0x0000000105a68407 IBAssertMarshallingFailureWithUniqueBacktrace (in IDEInterfaceBuilderKit)
      5  0x0000000105a6825e IBAssertMarshallingFailure (in IDEInterfaceBuilderKit)
      6  0x000000010cd2f89a (in IDEInterfaceBuilderCocoaTouchIntegration)
      7  0x000000010cd303c9 (in IDEInterfaceBuilderCocoaTouchIntegration)
      8  0x0000000105a0757c -[IBDocumentCompiler invokeWhileUsingSourceAsIntermediateDocument:] (in IDEInterfaceBuilderKit)
      9  0x0000000105a0788d -[IBDocumentCompiler invokeWithIntermediateDocumentOfTargetRuntime:alwaysCopy:block:] (in IDEInterfaceBuilderKit)
     10  0x000000010cd2fc97 (in IDEInterfaceBuilderCocoaTouchIntegration)
     11  0x000000010cd1e0e2 (in IDEInterfaceBuilderCocoaTouchIntegration)
     12  0x0000000105c19cd4 -[IBStoryboardSceneCompilationGroup compilationResultsForCompilationUnits:options:returningErrors:] (in IDEInterfaceBuilderKit)
     13  0x0000000105c0aa9a -[IBStoryboardDocumentCompiler compileUnitsFromCompilationGroups:filter:options:errors:] (in IDEInterfaceBuilderKit)
     14  0x0000000105c0bd73 __78-[IBStoryboardDocumentCompiler compileContentsOfStoryboardWithOptions:errors:]_block_invoke (in IDEInterfaceBuilderKit)
     15  0x0000000105ae5f46 IBWithAutoInvalidationPool (in IDEInterfaceBuilderKit)
     16  0x0000000105c0bb15 -[IBStoryboardDocumentCompiler compileContentsOfStoryboardWithOptions:errors:] (in IDEInterfaceBuilderKit)
     17  0x0000000105c0c116 -[IBStoryboardDocumentCompiler internalCompileWithOptions:error:] (in IDEInterfaceBuilderKit)
     18  0x000000010cd1e2f4 (in IDEInterfaceBuilderCocoaTouchIntegration)
     19  0x0000000105c0ca56 __57-[IBStoryboardDocumentCompiler compileWithOptions:error:]_block_invoke (in IDEInterfaceBuilderKit)
     20  0x0000000105a07699 -[IBDocumentCompiler invokeWithIntermediateDocument:] (in IDEInterfaceBuilderKit)
     21  0x0000000105a0783d -[IBDocumentCompiler invokeWithIntermediateDocumentOfTargetRuntime:alwaysCopy:block:] (in IDEInterfaceBuilderKit)
     22  0x0000000105c0c6fc -[IBStoryboardDocumentCompiler compileWithOptions:error:] (in IDEInterfaceBuilderKit)
     23  0x0000000105a07a27 +[IBDocumentCompiler compileContentsOfDocument:options:error:] (in IDEInterfaceBuilderKit)
     24  0x00000001059c2640 __47-[IBDocument compiledPackageWithOptions:error:]_block_invoke (in IDEInterfaceBuilderKit)
     25  0x00000001059fafd5 -[IBDocumentAutolayoutManager assertIfArbitrationIsScheduledDuring:] (in IDEInterfaceBuilderKit)
     26  0x00000001059c2597 -[IBDocument compiledPackageWithOptions:error:] (in IDEInterfaceBuilderKit)
     27  0x0000000104947f0a (in ibtoold)
     28  0x0000000104944b40 (in ibtoold)
     29  0x0000000104947370 (in ibtoold)
     30  0x000000010494d233 (in ibtoold)
     31  0x000000010494d7b0 (in ibtoold)
     32  0x000000010494d683 (in ibtoold)
     33  0x000000010493c60a (in ibtoold)
     34  0x000000010494ce2c (in ibtoold)
     35  0x000000010494c074 (in ibtoold)
     36  0x00007fff8a78b5c9 start (in libdyld.dylib)
     37  0x0000000000000002
    Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 
4

3 に答える 3

0

最後に、実行可能な(ただし、効率的ではありません)アプローチで問題を解決しました。

「バイナリ検索」の方法で、ストーリーボードから他のビュー シーンを削除して、問題のあるビュー シーンを特定するために範囲を絞り込みます。

問題のあるビューを特定した後、ビューとその制約を再設定しました。次に、ビルドに成功しました。

他の誰かに役立つかもしれないので、ここで共有してください。

于 2015-04-12T12:19:49.983 に答える
0

これが問題の解決方法です。ストーリーボード ファイルを Windows マシンにコピーし、Linq to XML を使用して小さな C# プログラムを作成し、"firstItem" 属性はあるが "secondItem" 属性が欠落している偽の制約を見つけました。基本的には1行だけです:

        var nosecondCons = xdoc.Descendants("constraint").Where(p => p.Attribute("secondItem") == null && p.Attribute("firstItem") != null);
于 2015-07-16T07:42:29.337 に答える