module Xcodeproj::Project::XCProjHelper

def available?

Returns:
  • (Bool) - Whether the xcproj tool is available in the path of
def available?
  `which xcproj`
  $?.exitstatus.zero?
end

def execute(command)

Returns:
  • (Array) - A tuple where the firs element
def execute(command)
  output = `#{command} 2>&1`
  success = $?.exitstatus.zero?
  [success, output]
end

def touch(path)

Returns:
  • (void) -
def touch(path)
  if available?
    command = "xcproj --project \"#{path}\" touch"
    success, output = execute(command)
    unless success
      message = "xcproj failed to touch the project. Check whether you installation of xcproj is functional.\n\n"
      message << command << "\n"
      message << output
      UI.warn(message)
    end
  end
end