BullseyeCoverage Up Contents Search

Apple Xcode

Configuring Xcode

By default, the BullseyeCoverage install program modifies the Xcode installation so that it can build with BullseyeCoverage.

tar -xf BullseyeCoverage-*-macOS.tar
sudo BullseyeCoverage-*/install

Only the active Xcode installation is modified, as identified by xcode-select --print-path. By default, the location of the changes is /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr.

Unconfiguring Xcode

Before removing BullseyeCoverage, run the BullseyeCoverage/uninstall program to remove the BullseyeCoverage integration changes and restore Xcode. For example:

sudo /Applications/BullseyeCoverage/uninstall
sudo rm -fr /Applications/BullseyeCoverage

Set COVFILE

To set the COVFILE environment variable, use this command in the Terminal application:

echo "COVFILE=$HOME/test.cov" >"$HOME/BullseyeCoverageEnv.txt"

This command locates the coverage file in your home directory. Adjust the COVFILE setting to suit your needs. For example, you may wish to locate the file in your project directory.

Building with Xcode IDE

Use the Coverage Browser to enable coverage build and then rebuild as usual.

Building with xcodebuild

Add BullseyeCoverage to the front of the PATH environment variable, enable coverage build and rebuild as usual.

PATH=/Applications/BullseyeCoverage/bin:$PATH
cov01 -1
xcodebuild ... clean ...
xcodebuild ... build ...
cov01 -0

Updated: 5 Sep 2024