Class: RunLoop::Ipa

Inherits:
Object
  • Object
show all
Defined in:
lib/run_loop/ipa.rb

Overview

A model of the an .ipa - a application binary for iOS devices.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path_to_ipa) ⇒ Calabash::Ipa

Create a new ipa instance.

Parameters:

  • path_to_ipa (String)

    The path the .ipa file.

Raises:

  • (RuntimeError)

    If the file does not exist.

  • (RuntimeError)

    If the file does not end in .ipa.



15
16
17
18
19
20
21
22
23
24
# File 'lib/run_loop/ipa.rb', line 15

def initialize(path_to_ipa)
  unless File.exist? path_to_ipa
    raise "Expected an ipa at '#{path_to_ipa}'"
  end

  unless path_to_ipa.end_with?('.ipa')
    raise "Expected '#{path_to_ipa}' to be an .ipa"
  end
  @path = path_to_ipa
end

Instance Attribute Details

#pathString (readonly)

The path to this .ipa.

Returns:

  • (String)

    A path to this .ipa.



8
9
10
# File 'lib/run_loop/ipa.rb', line 8

def path
  @path
end

Instance Method Details

#archesObject

Returns the arches for the binary.



62
63
64
# File 'lib/run_loop/ipa.rb', line 62

def arches
  app.arches
end

#bundle_identifierString

The bundle identifier of this ipa.

Returns:

  • (String)

    A string representation of this ipa’s CFBundleIdentifier



51
52
53
# File 'lib/run_loop/ipa.rb', line 51

def bundle_identifier
  app.bundle_identifier
end

#calabash_server_versionObject

Inspects the app’s executables for the server version @return a version instance



68
69
70
# File 'lib/run_loop/ipa.rb', line 68

def calabash_server_version
  app.calabash_server_version
end

#executable_nameString

Inspects the app’s Info.plist for the executable name.

Returns:

  • (String)

    The value of CFBundleExecutable.



57
58
59
# File 'lib/run_loop/ipa.rb', line 57

def executable_name
  app.executable_name
end