class Xcake::Configuration
This class represents a Build Configuration
in a xcode project.
This forms part of the DSL and is usally stored in files named ‘Cakefile`.
Constants
- SUPPORTED_DEVICES
@return [Hash<Symbol, String>] the constants for the
supported_devices setting
Attributes
@return [String] the path of the xcconfig file to use for
the build configuration. This is resolved to a PBXFileReference.
@return [String] the name of the configuration
the settings for the configuration this is what is used for the build settings for the build configuration.
@return [Hash<String, String>] the settings for the configuration
@return [Symbol] the type of the configuration, either :debug or :release
Public Class Methods
@param [String] name
the name of the configuration. This is used for the build configuration name.
@param [Proc] block
an optional block that configures the configuration through the DSL.
@example Creating a Configuration
.
Configuration.new :debug do |c| c.settings["INFO_PLIST"] = "./myapp/info.plist" end
# File lib/xcake/dsl/configuration.rb, line 48 def initialize(name) self.name = name.to_s self.settings = {} yield(self) if block_given? end
Public Instance Methods
Convienence method to easily set preprocessor directives
# File lib/xcake/dsl/configuration/sugar.rb, line 40 def preprocessor_definitions PreprocessorDefinitionsSettingProxy.new( settings, 'GCC_PREPROCESSOR_DEFINITIONS' ) end
Convienience method to easily set the product’s bundle identifier
# File lib/xcake/dsl/configuration/sugar.rb, line 34 def product_bundle_identifier=(identifier) settings['PRODUCT_BUNDLE_IDENTIFIER'] = identifier end
Convienence method to easily set the supported devices for a application.
Use this when you want to make a Non-Univeral iOS application.
@example Using Supported Devices
Target.new(project) do |t| t.all_configurations.each do |c| c.supported_devices = :ipad_only end end
# File lib/xcake/dsl/configuration/sugar.rb, line 26 def supported_devices=(devices) supported_devices = SUPPORTED_DEVICES[devices] settings['TARGETED_DEVICE_FAMILY'] = supported_devices end