5

Does anyone have a fix for this? I've seen other answers but none seem to work for me.

I can run other projects ok - but my current one fails with the above error - for no obvious reason I can think of. Clean runs ok - there are no code errors - building the project causes this.

I'm running xcode 5 - I've tried reinstalling the simulator - rebooting my machine - even my backup of my current project-which was running perfectly - now gets this error.

Developerium
  • 7,155
  • 5
  • 36
  • 56
ianM
  • 393
  • 1
  • 3
  • 16
  • Did you try cleaning? And go into the log and see what the actual error message is. – Kevin Dec 11 '13 at 22:32
  • Cleaning works fine. I'm afraid I don't know how to go into the log. – ianM Dec 11 '13 at 22:47
  • Are you using storyboard? Did you edit the storyboard source file manually? I've run into this error in the past after editing a storyboard XML file manually, and once with a really really huge storyboard. – user1459524 Dec 11 '13 at 23:49
  • In my case looks like a NavBar was corrupted - don't know if that's the right word - anyway deleting it solved the problem. Thanks for replying. – ianM Dec 12 '13 at 00:25

7 Answers7

10

I had a similar problem on Xcode 5.1.1 (Mac OS X 10.8.4) and was able to fix it by removing the

appearanceType="lightContent"

attribute from a <button> tag in the xib file. This I could only figure out by commenting out step by step parts of the xib file until the ibtool finally ran without error.

asmaier
  • 11,132
  • 11
  • 76
  • 103
  • 5
    In my iOS project I had an OS X-like `appearanceType="aqua"` so removing all of them worked. Strangely it crashed in Xcode 5.1.1 in one 10.8 machine but not on my 10.10 beta with the exact same Xcode version and build number. – Rivera Jun 10 '14 at 02:09
3

When ibtool crashes, there seems to often be an ibtoold crash causing it. For me it has been fruitful to look at the stack traces of ibtoold in /Library/Logs/DiagnosticReports to get a clue about why ibtool crashes. Today I had crashes that turned out to be fixed by setting "Appearance" to "Default (Aqua)" on an NSWindow in Interface Builder (in the resulting xib this removed the appearanceType property in the <window/> tag). I figured that out after looking at the following ibtoold crash report:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration        0x000000010db37f09 -[NSObject(IBAppKitObjectIntegration) setIbInspectedAppearanceType:] + 105
1   com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration        0x000000010daa39df -[NSWindowTemplate(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] + 725
2   com.apple.dt.IDE.IDEInterfaceBuilderKit     0x0000000107b23ffd __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke + 478
3   com.apple.dt.IDE.IDEInterfaceBuilderKit     0x0000000107b2232b -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] + 172

As you can see the crash happened in setIbInspectedAppearanceType which gives a hint on what might be the problematic part of the xib.

pajp
  • 504
  • 2
  • 4
2

In my case, I also have a TableView as the root controller, and this happened to me when I changed the type content of the TableView from Dynamic to Static while having existing prototype cells on it. Switching back from Static to Dynamic Prototypes fixed the compilation problem. It looks like XCode doesn't handle well this shocking changes in the Storyboard. Avoid this changes once you have Prototype cells on your TableViews.

Jorge Diaz
  • 2,503
  • 1
  • 14
  • 15
  • 1
    Sweet jesus this was driving me nuts for a couple of hours, thanks for the weird tip. – Wells Mar 01 '14 at 00:43
  • It would be good to see what actually changed under the hood. Probably `appearanceType` got fixed. – Rivera Jun 10 '14 at 02:06
1

I started taking my app apart - gently - bit by bit.

My root controller is a tableVC that connects to 6 other VC's. I deleted the segues to them all - and then - one by one - joined them up again - and narrowed it down to one VC.

The offending VC had a NavBar a couple of buttons and a date picker - so I deleted the NavBar first - tried the segue and it worked again - miraculously - and the app compiled.

I added a new NavBar - and that compiled too.

So I will add my buttons again and I think I'm home free!

Don't know why or how it happened though. (Corrupted NavBar? Deprecated NavBar?)

Hope this helps someone else. There has been a lot of grief around this error.

ianM
  • 393
  • 1
  • 3
  • 16
1

For me the diagnostic reports for IBTool were in User Diagnostic Reports and not System Diagnostic Reports, i.e. in /Users//Library/Logs/DiagnosticReports, with filename format "ibtoold_2014-11-04-133617_ComputerName.crash".

Application Specific Information: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-6250/InterfaceBuilderKit/WidgetIntegration/View/IBViewIntegration.m:3076 Details: Creating an out of band arbitration unit with a view () as the root under another view () is not yet implemented. The view would need to be in two arbitration units, the one above for positioning constraints, and the root of the one below for sizing constraints. But then that means that subviews cannot have constraints that affect the size of the view, so the view must have ibExternalTranslatesAutoresizingMaskIntoConstraints set to YES.

This led me to this post on the Xamarin forums:

http://forums.xamarin.com/discussion/18971/storyboarding-a-custom-uitableviewcell

where Adi Saric has suggested doing a global replace on all translatesAutoresizingMaskIntoConstraints="NO" with an empty string. After wasted hours this finally sorted it for me!

Breeno
  • 3,007
  • 2
  • 31
  • 30
0

Look to DiagnosticReports in /Library/Logs/DiagnosticReports and get what kind of element you have the problem with (NSWindow, NSView…). It looks like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.dt.IDE.IDEInterfaceBuilderCocoaIntegration 0x000000010c7c6109 -[NSObject(IBAppKitObjectIntegration) setIbInspectedAppearanceType:] + 105 1 com.apple.dt.IDE.IDEInterfaceBuilderKit 0x00000001067cdd91 -[NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] + 654

Check all properties you use in this element (for me it was Aqua, i deleted it and all my problems were solved)

jnovo
  • 5,659
  • 2
  • 38
  • 56
0

Clean build folder fixed this issue for me.

Of course that won't be the answer for everyone, but it's a good place to start :)

UglyBlueCat
  • 439
  • 1
  • 7
  • 22