class Fastlane::Actions::XctoolAction

Public Class Methods

author() click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 27
def self.author
  "KrauseFx"
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 50
def self.category
  :testing
end
description() click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 15
def self.description
  "Run tests using xctool"
end
details() click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 19
def self.details
  [
    "You can run any `xctool` action. This will require having [xctool](https://github.com/facebook/xctool) installed through [Homebrew](http://brew.sh).",
    "It is recommended to store the build configuration in the `.xctool-args` file.",
    "More information: [https://docs.fastlane.tools/actions/xctool/](https://docs.fastlane.tools/actions/xctool/)."
  ].join("\n")
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 35
def self.example_code
  [
    'xctool(:test)',

    '# If you prefer to have the build configuration stored in the `Fastfile`:
    xctool(:test, [
      "--workspace", "\'AwesomeApp.xcworkspace\'",
      "--scheme", "\'Schema Name\'",
      "--configuration", "Debug",
      "--sdk", "iphonesimulator",
      "--arch", "i386"
    ].join(" "))'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 31
def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/xctool.rb, line 4
def self.run(params)
  UI.important("Have you seen the new 'scan' tool to run tests? https://docs.fastlane.tools/actions/scan/")
  unless Helper.test?
    UI.user_error!("xctool not installed, please install using `brew install xctool`") if `which xctool`.length == 0
  end

  params = [] if params.kind_of?(FastlaneCore::Configuration)

  Actions.sh('xctool ' + params.join(' '))
end