Module: Pod::Podfile::DSL

Defined in:
lib/cocoapods-binary/Main.rb,
lib/cocoapods-binary/helper/feature_switches.rb

Constant Summary collapse

@@enable_prebuild_patch =
false

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.enable_prebuild_patch(value) ⇒ Object

when enable, ‘pod` function will skip all pods without ’prebuild => true’



17
18
19
# File 'lib/cocoapods-binary/helper/feature_switches.rb', line 17

def self.enable_prebuild_patch(value)
    @@enable_prebuild_patch = value
end

Instance Method Details

#all_binary!Object

Enable prebuiding for all pods it has a lower priority to other binary settings



11
12
13
# File 'lib/cocoapods-binary/Main.rb', line 11

def all_binary!
    DSL.prebuild_all = true
end

#enable_bitcode_for_prebuilt_frameworks!Object

Enable bitcode for prebuilt frameworks



16
17
18
# File 'lib/cocoapods-binary/Main.rb', line 16

def enable_bitcode_for_prebuilt_frameworks!
    DSL.bitcode_enabled = true
end

#keep_source_code_for_prebuilt_frameworks!Object

Don’t remove source code of prebuilt pods It may speed up the pod install if git didn’t include the ‘Pods` folder



23
24
25
# File 'lib/cocoapods-binary/Main.rb', line 23

def keep_source_code_for_prebuilt_frameworks!
    DSL.dont_remove_source_code = true
end

#set_custom_xcodebuild_options_for_prebuilt_frameworks(options) ⇒ Object

Add custom xcodebuild option to the prebuilding action

You may use this for your special demands. For example: the default archs in dSYMs of prebuilt frameworks is ‘arm64 armv7 x86_64’, and no ‘i386’ for 32bit simulator. It may generate a warning when building for a 32bit simulator. You may add following to your podfile

` set_custom_xcodebuild_options_for_prebuilt_frameworks :simulator => "ARCHS=$(ARCHS_STANDARD)" `

Another example to disable the generating of dSYM file:

` set_custom_xcodebuild_options_for_prebuilt_frameworks "DEBUG_INFORMATION_FORMAT=dwarf"`

Parameters:

  • options (String or Hash)

    If is a String, it will apply for device and simulator. Use it just like in the commandline. If is a Hash, it should be like this: { :device => “XXXXX”, :simulator => “XXXXX” }



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/cocoapods-binary/Main.rb', line 46

def set_custom_xcodebuild_options_for_prebuilt_frameworks(options)
    if options.kind_of? Hash
        DSL.custom_build_options = [ options[:device] ] unless options[:device].nil?
        DSL.custom_build_options_simulator = [ options[:simulator] ] unless options[:simulator].nil?
    elsif options.kind_of? String
        DSL.custom_build_options = [options]
        DSL.custom_build_options_simulator = [options]
    else
        raise "Wrong type."
    end
end