Sha256: e5e35ac75b7a259e1270c9316d4cc677a2a04c7e84dbc8aa1ee66628e10c5f76

Contents?: true

Size: 1.23 KB

Versions: 2

Compression:

Stored size: 1.23 KB

Contents

#!/usr/bin/env ruby
# coding: utf-8

require 'cuesmash/app'

module Cuesmash
  #
  # Provides an object to get information about the ios app that is being built.
  #
  class IosApp < App
    # Public: the path to the dir containing the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/
    attr_reader :app_dir

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

    # Public: the app name i.e. MyApp.app
    attr_reader :app_name

    # Public: the xcode Derived Data temp directory
    attr_reader :tmp_dir

    #
    # Create a new App instance
    #
    # @param  file_name [String] The usually is the scheme of the xcode project
    # @param build_configuration [String] which iOS build configuration to run i.e. Release, Debug
    #
    # @return [App] A app instance
    def initialize(file_name:, build_configuration:)
      @app_name = "#{file_name}" << '.app'
      @tmp_dir = Dir.mktmpdir(file_name)
      @build_configuration = build_configuration

      @app_dir = "#{@tmp_dir}" << "/#{@build_configuration}-iphonesimulator/"

      @app_path = "#{@app_dir}" << "#{@app_name}"
    end
  end # class IosApp
end # module Cuesmash

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cuesmash-0.1.9.9 lib/cuesmash/ios_app.rb
cuesmash-0.1.9.8 lib/cuesmash/ios_app.rb