Sha256: 193e9ef997ce029eba9d6b12aa137dd1d280fc2befb3c956dae264711dd102f3

Contents?: true

Size: 1.23 KB

Versions: 20

Compression:

Stored size: 1.23 KB

Contents

module Xcake
  class Configuration
    # @return [Hash<Symbol, String>] the constants for the
    #                                supported_devices setting
    #
    SUPPORTED_DEVICES = {
      iphone_only: '1',
      ipad_only: '2',
      universal: '1,2'
    }.freeze

    # 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 do |t|
    #             t.all_configurations.each do |c|
    #                c.supported_devices = :ipad_only
    #             end
    #          end
    #
    def supported_devices=(devices)
      supported_devices = SUPPORTED_DEVICES[devices]
      settings['TARGETED_DEVICE_FAMILY'] = supported_devices
    end

    # Convienience method to easily set the
    # product's bundle identifier
    #
    def product_bundle_identifier=(identifier)
      settings['PRODUCT_BUNDLE_IDENTIFIER'] = identifier
    end

    # Convienence method to easily set preprocessor directives
    #
    def preprocessor_definitions
      PreprocessorDefinitionsSettingProxy.new(
        settings,
        'GCC_PREPROCESSOR_DEFINITIONS'
      )
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
xcake-0.9.2 lib/xcake/dsl/configuration/sugar.rb
xcake-0.9.1 lib/xcake/dsl/configuration/sugar.rb
xcake-0.9.0 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.13 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.12 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.10 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.9 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.8 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.7 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.6 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.3 lib/xcake/dsl/configuration/sugar.rb
xcake-0.8.1 lib/xcake/configuration/sugar.rb
xcake-0.7.1 lib/xcake/configuration/sugar.rb
xcake-0.7.0 lib/xcake/configuration/sugar.rb
xcake-0.6.25 lib/xcake/configuration/sugar.rb
xcake-0.6.24 lib/xcake/configuration/sugar.rb
xcake-0.6.23 lib/xcake/configuration/sugar.rb
xcake-0.6.22 lib/xcake/configuration/sugar.rb
xcake-0.6.21 lib/xcake/configuration/sugar.rb
xcake-0.6.20 lib/xcake/configuration/sugar.rb