Skip to content

Instantly share code, notes, and snippets.

@grigorye
Created August 6, 2019 09:48
Show Gist options
  • Save grigorye/51f8174aa56cab49961526a94fbda5b7 to your computer and use it in GitHub Desktop.
Save grigorye/51f8174aa56cab49961526a94fbda5b7 to your computer and use it in GitHub Desktop.
Enable code coverage for the given .xcscheme
#! /usr/bin/ruby
require 'xcodeproj'
xcscheme, * = ARGV
scheme = Xcodeproj::XCScheme.new File.join(xcscheme)
test_action = scheme.test_action
test_action.code_coverage_enabled = true
scheme.test_action = test_action
scheme.save!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment