Class: Xcodeproj::Project
- Inherits:
-
Object
- Object
- Xcodeproj::Project
- Defined in:
- lib/cocoapods-alexandria/rome/compiler.rb,
lib/cocoapods-alexandria/helper/xcodeproj.rb
Defined Under Namespace
Modules: Object
Instance Method Summary collapse
- #all_dependencies_for(umbrella_target) ⇒ Object
- #configurations ⇒ Object
- #disable_bitcode_generation ⇒ Object
- #fix_bundle_code_signing ⇒ Object
- #fix_deployment_target_warnings(minimum_version) ⇒ Object
- #force_bitcode_generation ⇒ Object
- #target(target_name) ⇒ Object
Instance Method Details
#all_dependencies_for(umbrella_target) ⇒ Object
97 98 99 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 97 def all_dependencies_for(umbrella_target) target(umbrella_target.cocoapods_target_label).all_dependencies end |
#configurations ⇒ Object
3 4 5 6 7 |
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 3 def configurations build_configurations .map(&:name) .reject { |c| ['Debug', 'Release'].include? c } end |
#disable_bitcode_generation ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 30 def disable_bitcode_generation targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' end end save end |
#fix_bundle_code_signing ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 19 def fix_bundle_code_signing targets.each do |target| if target.respond_to?(:product_type) and target.product_type == 'com.apple.product-type.bundle' target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' end end end save end |
#fix_deployment_target_warnings(minimum_version) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 9 def fix_deployment_target_warnings(minimum_version) targets.each do |target| target.build_configurations.each do |config| version = Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_version.to_s if version < minimum_version end end save end |
#force_bitcode_generation ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 39 def force_bitcode_generation targets.each do |target| target.build_configurations.each do |config| config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode' end end save end |
#target(target_name) ⇒ Object
101 102 103 104 105 106 107 108 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 101 def target(target_name) result = targets.find { |t| t.name == target_name } if result.is_native? return result else return nil end end |