IBDecodable / IBLinter

A linter tool for Interface Builder
MIT License
948 stars 42 forks source link

Crash with XML parsing error #15

Closed sirnacnud closed 6 years ago

sirnacnud commented 6 years ago

I tried linting a project and the tool crashes with the below error. The XIB file it is failing on is part of CocoaLumberjack and can be found here.

Fatal error: parse error /Users/dcunningham/Source/ios/Carthage/Checkouts/CocoaLumberjack/Framework/FmwkTest/en.lproj/MainMenu.xib: XML Element Error: Incorrect key ["document"]: file /private/tmp/iblinter-20180122-98170-1yh0fk4/IBLinter-0.1.5/Sources/IBLinterCore/XibFile.swift, line 37
Illegal instruction: 4
kateinoigakukun commented 6 years ago

Thank you for your report.

This error is seemed to be caused by AppKit xib. IBLinter only targets UIKit xib. So I'll make PR to skip AppKit xib file.

piotrtobolski commented 6 years ago

Nope, I was getting this error when using UIKit xib. But it was very old file saved in some old Xcode format. Just entering this xib and saving it fixed this issue (and changed almost everything in this file). I am working in an old project and this xib dates probably back to iOS 6 and wasn't touched since. This is just table view cell with empty view and some constraints: EmptyTableViewCell.xib.zip

alakoring commented 6 years ago

My #16 is fixed now.