Introducing IBAnalyzer

I'm happy to announce the release of my new tool called IBAnalyzer. Its aim is to allow you to catch common xib and storyboard-related issues without running an app or writing unit tests.

With IBAnalyzer, you're currently able to:

  1. Find unimplemented outlets & actions in classes. Avoid crashes caused by exceptions, like a dreadful:

    *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '
    [<Sample.TwitterViewController 0x7fa84630a370> setValue:forUndefinedKey:]: this
     class is not key value coding-compliant for the key twitterImageView.'
    
  2. Find @IBOutlets and @IBActions defined in code but not connected to from nibs. No more:

    Unnecessary action

    and

    Unnecessary outlet

All that thanks to its output, an example of which you can see below:

$ ./ibanalyzer ~/code/Sample/

TwitterViewController doesn't implement a required @IBAction named: loginButtonPressed:
TwitterViewController doesn't implement a required @IBOutlet named: twitterImageView
LoginViewController contains unused @IBAction named: onePasswordButtonTapped:
MessageCell contains unused @IBOutlet named: unreadIndicatorView
MessagesViewController contains unused @IBAction named: infoButtonPressed

IBAnalyzer is in an early stage of life but I hope it will continue to get new types of warnings and become a useful tool for developers relying on Interface Builder. You should give it a go. Its source is available on GitHub.