Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(xcode 5) ibtool failed with exit code 255

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.

like image 472
ianM Avatar asked Dec 11 '13 22:12

ianM


3 Answers

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.

like image 57
asmaier Avatar answered Sep 21 '22 19:09

asmaier


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.

like image 20
pajp Avatar answered Sep 22 '22 19:09

pajp


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.

like image 24
Jorge Diaz Avatar answered Sep 20 '22 19:09

Jorge Diaz