class Cuesmash::IosApp

Provides an object to get information about the ios app that is being built.

Attributes

app_dir[R]

Public: the path to the dir containing the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/

app_name[R]

Public: the app name i.e. MyApp.app

app_path[R]

Public: the full path including the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/MyApp.app“

tmp_dir[R]

Public: the xcode Derived Data temp directory

Public Class Methods

new(file_name:, build_configuration:, app_name:, device: nil) click to toggle source

Create a new App instance

@param [String] file_name: This usually is the scheme of the xcode project @param [String] build_configuration: which iOS build configuration to run i.e. Release, Debug @param [String] app_name: name of the app @param [String] device: nil the UDID of the device to run on or nil if running on simulator

# File lib/cuesmash/ios_app.rb, line 32
def initialize(file_name:, build_configuration:, app_name:, device: nil)
  app_name = file_name if app_name.nil?

  @app_name = "#{app_name}" << '.app'
  @tmp_dir = Dir.mktmpdir(app_name)
  @build_configuration = build_configuration

  if device.nil?
    @app_dir = "#{@tmp_dir}" << "/#{@build_configuration}-iphonesimulator/"
  else
    @app_dir = "#{@tmp_dir}" << "/#{@build_configuration}-iphoneos/"
  end

  @app_path = "#{@app_dir}" << "#{@app_name}"
end