I'm writing a custom build script that processes .storyboard
files. Sometimes a storyboard does not fulfill a requirement to be processed and thus I want to output an error message.
There error messages are shown correctly when my script writes this output:
warning: View controller has no storyboardIdentifier (class "ShoppingCartViewController", title "ShoppingCartViewController")
But of course they lack context when shown in the Issue Navigator:
If I prefix the error output of my build script with file name and file number like this, I get more context:
/Users/l_schimmel/full/path/to/file.storyboard:1: warning: view controller has no storyboardIdentifier (class "", title "ItemSelectionViewController@04_shop_articles")
If I view my storyboard as souce, I even get inline annotaions (let's forget about the fact that line 1 is not the most appropriate line number here):
But of course, linking storyboard erros to a specific line in the source XML is rather useless. It would be nicer to link to the specific node in the graphical storyboard view in the Interface Builder. Apples own tools can do this. I found out they output error messages like this:
/* com.apple.ibtool.document.warnings */
/Users/l_schimmel/full/path/to/file.storyboard:uKR-Dw-A3n: warning: Plain Style unsupported in a Navigation Item [9]
When I click the warning in the Issue Navigator, the storyboard opens up in the Interface Builder and the item with the id uKR-Dw-A3n
is pre-selected.
However, when I use such id instead of a line number, the warning will completely disappear from the Issue Navigator:
/* com.apple.ibtool.document.warnings */
/Users/l_schimmel/full/path/to/file.storyboard:iSw-vh-ZUi: warning: view controller has no storyboardIdentifier (class "ShoppingCartViewController", title "ShoppingCartViewController")
What am I missing?