Module: Pod::Podfile::DSL
- Defined in:
- lib/cocoapods-ppbuild/Main.rb,
lib/cocoapods-ppbuild/helper/feature_switches.rb
Constant Summary collapse
- @@enable_prebuild_patch =
false
Class Method Summary collapse
-
.enable_prebuild_patch(value) ⇒ Object
when enable, ‘pod` function will skip all pods without ’prebuild => true’.
Instance Method Summary collapse
-
#enable_bitcode_for_prebuilt_frameworks! ⇒ Object
Enable bitcode for prebuilt frameworks.
-
#remove_source_code_for_prebuilt_frameworks! ⇒ Object
设置是否保存源码,默认 true.
-
#set_custom_xcodebuild_options_for_prebuilt_frameworks(options) ⇒ Object
Add custom xcodebuild option to the prebuilding action.
-
#use_dynamic_binary! ⇒ Object
Enable prebuiding for all pods it has a lower priority to other ppbuild settings.
-
#use_static_binary! ⇒ Object
设置是否使用静态库.
-
#use_swift_version(version) ⇒ Object
设置当前swift版本.
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-ppbuild/helper/feature_switches.rb', line 17 def self.enable_prebuild_patch(value) @@enable_prebuild_patch = value end |
Instance Method Details
#enable_bitcode_for_prebuilt_frameworks! ⇒ Object
Enable bitcode for prebuilt frameworks
34 35 36 |
# File 'lib/cocoapods-ppbuild/Main.rb', line 34 def enable_bitcode_for_prebuilt_frameworks! DSL.bitcode_enabled = true end |
#remove_source_code_for_prebuilt_frameworks! ⇒ Object
设置是否保存源码,默认 true
29 30 31 |
# File 'lib/cocoapods-ppbuild/Main.rb', line 29 def remove_source_code_for_prebuilt_frameworks! DSL.dont_remove_source_code = false 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"`
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/cocoapods-ppbuild/Main.rb', line 57 def () if .kind_of? Hash DSL. = [ [:device] ] unless [:device].nil? DSL. = [ [:simulator] ] unless [:simulator].nil? elsif .kind_of? String DSL. = [] DSL. = [] else raise "Wrong type." end end |
#use_dynamic_binary! ⇒ Object
Enable prebuiding for all pods it has a lower priority to other ppbuild settings
11 12 13 14 15 |
# File 'lib/cocoapods-ppbuild/Main.rb', line 11 def use_dynamic_binary! DSL.prebuild_all = true DSL.static_binary = false DSL.dont_remove_source_code = true end |
#use_static_binary! ⇒ Object
设置是否使用静态库
22 23 24 25 26 |
# File 'lib/cocoapods-ppbuild/Main.rb', line 22 def use_static_binary! DSL.prebuild_all = true DSL.static_binary = true DSL.dont_remove_source_code = true end |
#use_swift_version(version) ⇒ Object
设置当前swift版本
17 18 19 |
# File 'lib/cocoapods-ppbuild/Main.rb', line 17 def use_swift_version(version) DSL.swift_version = version end |