Class: Xcodeproj::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-alexandria/rome/compiler.rb,
lib/cocoapods-alexandria/helper/xcodeproj.rb

Defined Under Namespace

Modules: Object

Instance Method Summary collapse

Instance Method Details

#all_dependencies_for(umbrella_target) ⇒ Object



94
95
96
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 94

def all_dependencies_for(umbrella_target)
  target(umbrella_target.cocoapods_target_label).all_dependencies
end

#configurationsObject



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

#fix_deployment_target_warningsObject



9
10
11
12
13
14
15
16
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 9

def fix_deployment_target_warnings
  targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] == '8.0'
    end
  end
  save
end

#force_bitcode_generationObject



18
19
20
21
22
23
24
25
# File 'lib/cocoapods-alexandria/helper/xcodeproj.rb', line 18

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



98
99
100
101
102
103
104
105
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 98

def target(target_name)
  result = targets.find { |t| t.name == target_name }
  if result.is_native?
    return result
  else
    return nil
  end
end