{"id":889,"url":"https://github.com/fastred/IBAnalyzer","last_synced_at":"2025-07-30T19:32:59.297Z","repository":{"id":62446294,"uuid":"77301681","full_name":"fastred/IBAnalyzer","owner":"fastred","description":"Find common xib and storyboard-related problems without running your app or writing unit tests.","archived":true,"fork":false,"pushed_at":"2018-06-14T12:10:48.000Z","size":533,"stargazers_count":951,"open_issues_count":15,"forks_count":26,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-08-14T14:05:12.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://holko.pl","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastred.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-24T22:07:49.000Z","updated_at":"2024-08-12T19:26:46.000Z","dependencies_parsed_at":"2022-11-01T23:04:53.259Z","dependency_job_id":null,"html_url":"https://github.com/fastred/IBAnalyzer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FIBAnalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FIBAnalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FIBAnalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FIBAnalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastred","download_url":"https://codeload.github.com/fastred/IBAnalyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228179007,"owners_count":17881121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:33.980Z","updated_at":"2024-12-04T19:32:18.142Z","avatar_url":"https://github.com/fastred.png","language":"Swift","readme":"[![Build Status](https://travis-ci.org/fastred/IBAnalyzer.svg?branch=master)](https://travis-ci.org/fastred/IBAnalyzer) [![codecov](https://codecov.io/gh/fastred/IBAnalyzer/branch/master/graph/badge.svg)](https://codecov.io/gh/fastred/IBAnalyzer)\n\n# IBAnalyzer\n\nFind common xib and storyboard-related problems without running your app or writing unit tests.\n\n## Usage\n\nPass a path to your project to `ibanalyzer` command line tool. Here's an example output you can expect:\n\n```\n$ ./ibanalyzer ~/code/Sample/\n\nTwitterViewController doesn't implement a required @IBAction named: loginButtonPressed:\nTwitterViewController doesn't implement a required @IBOutlet named: twitterImageView\nLoginViewController contains unused @IBAction named: onePasswordButtonTapped:\nMessageCell contains unused @IBOutlet named: unreadIndicatorView\nMessagesViewController contains unused @IBAction named: infoButtonPressed\n```\n\nWith IBAnalyzer, you're able to:\n\n1. Find unimplemented outlets \u0026 actions in classes. Avoid crashes caused by exceptions, like the dreadful:\n    ```\n    *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '\n    [\u003cSample.TwitterViewController 0x7fa84630a370\u003e setValue:forUndefinedKey:]: this\n     class is not key value coding-compliant for the key twitterImageView.'\n    ```\n\n2. Find `@IBOutlet`s and `@IBAction`s defined in code but not connected to from nibs. No more:\n\n    \u003cimg src=\"Resources/unnecessary-action@2x.png\" width=\"474\" alt=\"Unnecessary action\"\u003e\n\n    and\n\n    \u003cimg src=\"Resources/unnecessary-outlet@2x.png\" width=\"474\" alt=\"Unnecessary outlet\"\u003e\n\n## Drawbacks\n\nThis is a new tool, used only on a handful of projects till now. If you encounter any bugs, please create new issues.\n\n**Doesn't work with Objective-C. Tested on Swift 3.0.**\n\n## How It Works\n\nIBAnalyzer starts by parsing all `.xib,` `.storyboard` and `.swift` files in the provided folder. It then uses this data (wrapped in `AnalyzerConfiguration`) to generate warnings. You can see the source of an analyzer [checking connections between source code and nibs here](https://github.com/fastred/IBAnalyzer/blob/master/IBAnalyzer/Analyzers/ConnectionAnalyzer.swift).\n\nNew warnings can be implemented by adding a new type conforming to the `Analyzer` protocol and initializing it in `main.swift`. Check [issues](https://github.com/fastred/IBAnalyzer/issues) to learn about some ideas for new warnings.\n\n## Installation\n\n### CocoaPods (Build Phase integration)\n\nNote: This can significantly slow-down your build times.\n\n1. Add `pod 'IBAnalyzer'` to your `Podfile`.\n1. Run `pod repo update` and then `pod install`.\n1. Go to target settings -\u003e Build Phases and add a `New Run Script Phase`. Change its name to something like `IBAnalyzer`.\n1. Use this script to run analysis on all files in your repository (possibly including 3rd party dependencies, like `Pods/`):\n\n    ```\n    \"${PODS_ROOT}/IBAnalyzer/bin/ibanalyzer\" ./\n    ```\n    \n    or this one to run analysis only on a single folder:\n    \n    ```\n    \"${PODS_ROOT}/IBAnalyzer/bin/ibanalyzer\" FolderName/\n    ```\n\n### Binary\n\nDownload the newest prebuilt binary from the [Releases](https://github.com/fastred/IBAnalyzer/releases) tab. Unpack and run using:\n\n```\n$ bin/ibanalyzer /path/to/your/project\n```\n\n### From Source\n\n1. Clone or download the repo.\n1. Open `IBAnalyzer.xcworkspace` in Xcode 8.2 and build the project (⌘-B).\n1. `$ cd Build/MacOS`\n1. `$ ./ibanalyzer /path/to/your/project`\n\n## Attributions\n\n- [SourceKitten](https://github.com/jpsim/SourceKitten) – IBAnalyzer wouldn't be possible without it\n- [SwiftGen](https://github.com/AliSoftware/SwiftGen) – inspiration for `NibParser`\n- [Sourcery](https://github.com/krzysztofzablocki/Sourcery) – IBAnalyzer uses pretty much the same `Rakefile`\n\n## Author\n\nProject initially started by [Arek Holko](http://holko.pl) ([@arekholko](https://twitter.com/arekholko) on Twitter).\n","funding_links":[],"categories":["Code Quality","Swift"],"sub_categories":["Other free courses","Getting Started"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastred%2FIBAnalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastred%2FIBAnalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastred%2FIBAnalyzer/lists"}