Skip to content
This repository

Sonar Plugin for Objective C

branch: master

Sonar Plugin for Objective C

This repository hosts the Objective-C plugin for SonarQube. This plugin enables to analyze and track the quality of iOS (iPhone, iPad) and MacOS developments.

The plugin is in active development and has been bootstrapped with the help of the Sonar team. If you wish to contribute, check the Contributing wiki page.

Find below an example of an iOS SonarQube dashboard:

Example iOS SonarQube dashboard


  • [ ] Complexity
  • [ ] Design
  • [x] Documentation
  • [x] Duplications
  • [x] Issues
  • [x] Size
  • [x] Tests

For more details, see the list of Sonar metrics implemented or pending.


The latest release is the 0.3.1, and it's available here.

You can also download the latest build of the plugin from Cloudbees.

In the worst case, the Maven repository is available here:


  • a Mac with Xcode...
  • SonarQube and SonarQube Runner installed
  • xctool (HomeBrew installed and brew install xctool)
  • OCLint installed. In my case the 0.7 version is failing on my project, so I recommend installing the version (at least it works with
  • gcovr installed

Installation (once for all your Objective-C projects)

  • Install the plugin through the Update Center (of SonarQube) or download it into the $SONARQUBE_HOME/extensions/plugins directory
  • Restart the SonarQube server.

Configuration (once per project)

  • Copy in your Xcode project root folder (along your .xcodeproj file)
  • Edit the file to match your Xcode iOS/MacOS project
  • Copy in your Xcode project root folder and make it executable

The good news is that you don't have to modify your Xcode project to enable Sonar!. Ok, there might be one needed modification if you don't have a specific scheme for your test target, but that's all.


  • Run the script in your Xcode project root folder
  • Enjoy or file an issue!

Build Status

Build Status


  • Cyril Picat
  • Denis Bregeon
  • Romain Felden
  • François Helg
  • Mete Balci


  • v0.3.1 (2013/10): fix release
  • v0.3 (2013/10): added support for OCUnit tests and test coverage
  • v0.2 (2013/10): added OCLint checks as Sonar violations
  • v0.0.1 (2012/09): v0 with basic metrics such as nb lines of code, nb lines of comment, nb of files, duplications


Sonar Plugin for Objective C is released under the GNU LGPL 3 license:

Something went wrong with that request. Please try again.