Class: XcodeBuilder
- Inherits:
-
Object
- Object
- XcodeBuilder
- Includes:
- EnvParser
- Defined in:
- lib/cocoapods-pack/xcode_builder.rb
Defined Under Namespace
Classes: BuildError
Instance Attribute Summary collapse
-
#xcodebuild_outdir ⇒ Object
readonly
Returns the value of attribute xcodebuild_outdir.
-
#xcodeproject_path ⇒ Object
readonly
Returns the value of attribute xcodeproject_path.
Instance Method Summary collapse
- #build(platform, target, xcodebuild_args = nil) ⇒ Object
- #build_settings(platform, target, type = nil) ⇒ Object
-
#initialize(xcodeproject_path, xcodebuild_opts, xcodebuild_outdir, user_interface, verbose = false) ⇒ XcodeBuilder
constructor
A new instance of XcodeBuilder.
Methods included from EnvParser
Constructor Details
#initialize(xcodeproject_path, xcodebuild_opts, xcodebuild_outdir, user_interface, verbose = false) ⇒ XcodeBuilder
Returns a new instance of XcodeBuilder.
29 30 31 32 33 34 35 |
# File 'lib/cocoapods-pack/xcode_builder.rb', line 29 def initialize(xcodeproject_path, xcodebuild_opts, xcodebuild_outdir, user_interface, verbose = false) @xcodeproject_path = xcodeproject_path @xcodebuild_opts = xcodebuild_opts @xcodebuild_outdir = xcodebuild_outdir @user_interface = user_interface @verbose = verbose end |
Instance Attribute Details
#xcodebuild_outdir ⇒ Object (readonly)
Returns the value of attribute xcodebuild_outdir.
24 25 26 |
# File 'lib/cocoapods-pack/xcode_builder.rb', line 24 def xcodebuild_outdir @xcodebuild_outdir end |
#xcodeproject_path ⇒ Object (readonly)
Returns the value of attribute xcodeproject_path.
24 25 26 |
# File 'lib/cocoapods-pack/xcode_builder.rb', line 24 def xcodeproject_path @xcodeproject_path end |
Instance Method Details
#build(platform, target, xcodebuild_args = nil) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/cocoapods-pack/xcode_builder.rb', line 37 def build(platform, target, xcodebuild_args = nil) return build_ios(target, xcodebuild_args) if platform == :ios return build_osx(target, xcodebuild_args) if platform == :osx return build_watchos(target, xcodebuild_args) if platform == :watchos return build_tvos(target, xcodebuild_args) if platform == :tvos raise "Unknown platform: '#{platform}'" end |
#build_settings(platform, target, type = nil) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/cocoapods-pack/xcode_builder.rb', line 46 def build_settings(platform, target, type = nil) return build_ios_settings(target, type) if platform == :ios return build_watchos_settings(target, type) if platform == :watchos return build_tvos_settings(target, type) if platform == :tvos build_osx_settings(target) if platform == :osx end |