Module: Gym

Defined in:
gym/lib/gym/xcode.rb,
gym/lib/gym/module.rb,
gym/lib/gym/runner.rb,
gym/lib/gym/manager.rb,
gym/lib/gym/options.rb,
gym/lib/gym/detect_values.rb,
gym/lib/gym/error_handler.rb,
gym/lib/gym/commands_generator.rb,
gym/lib/gym/code_signing_mapping.rb,
gym/lib/gym/generators/build_command_generator.rb,
gym/lib/gym/generators/package_command_generator.rb,
gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb,
gym/lib/gym/generators/package_command_generator_xcode7.rb

Defined Under Namespace

Classes: BuildCommandGenerator, CodeSigningMapping, CommandsGenerator, DetectValues, ErrorHandler, Manager, Options, PackageCommandGenerator, PackageCommandGeneratorXcode7, Runner, Xcode, XcodebuildFixes

Constant Summary collapse

Helper =

you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore

FastlaneCore::Helper
UI =
FastlaneCore::UI
Boolean =
Fastlane::Boolean
ROOT =
Pathname.new(File.expand_path('../../..', __FILE__))
DESCRIPTION =
"Building your iOS apps has never been easier"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.cacheObject

Returns the value of attribute cache.



11
12
13
# File 'gym/lib/gym/module.rb', line 11

def cache
  @cache
end

.configObject

Returns the value of attribute config.



7
8
9
# File 'gym/lib/gym/module.rb', line 7

def config
  @config
end

.projectObject

Returns the value of attribute project.



9
10
11
# File 'gym/lib/gym/module.rb', line 9

def project
  @project
end

Class Method Details

.building_for_ios?Boolean

Returns:



28
29
30
31
32
33
34
35
36
37
38
39
# File 'gym/lib/gym/module.rb', line 28

def building_for_ios?
  if Gym.project.mac?
    # Can be building for iOS if mac project and catalyst
    return building_mac_catalyst_for_ios?
  else
    # Can be iOS project and build for mac if catalyst
    return false if building_mac_catalyst_for_mac?

    # Can be iOS project if iOS, tvOS, or watchOS
    return Gym.project.ios? || Gym.project.tvos? || Gym.project.watchos?
  end
end

.building_for_mac?Boolean

Returns:



41
42
43
44
45
46
47
48
# File 'gym/lib/gym/module.rb', line 41

def building_for_mac?
  if Gym.project.supports_mac_catalyst?
    # Can be a mac project and not build mac if catalyst
    return building_mac_catalyst_for_mac?
  else
    return Gym.project.mac?
  end
end

.building_mac_catalyst_for_ios?Boolean

Returns:



50
51
52
# File 'gym/lib/gym/module.rb', line 50

def building_mac_catalyst_for_ios?
  Gym.project.supports_mac_catalyst? && Gym.config[:catalyst_platform] == "ios"
end

.building_mac_catalyst_for_mac?Boolean

Returns:



54
55
56
# File 'gym/lib/gym/module.rb', line 54

def building_mac_catalyst_for_mac?
  Gym.project.supports_mac_catalyst? && Gym.config[:catalyst_platform] == "macos"
end

.export_destination_upload?Boolean

Returns:



58
59
60
61
62
63
64
# File 'gym/lib/gym/module.rb', line 58

def export_destination_upload?
  config_path = Gym.cache[:config_path]
  return false if config_path.nil?

  result = CFPropertyList.native_types(CFPropertyList::List.new(file: config_path).value)
  return result["destination"] == "upload"
end

.gymfile_nameObject



19
20
21
# File 'gym/lib/gym/module.rb', line 19

def gymfile_name
  "Gymfile"
end

.init_libsObject



23
24
25
26
# File 'gym/lib/gym/module.rb', line 23

def init_libs
  # Import all the fixes
  require 'gym/xcodebuild_fixes/generic_archive_fix'
end