Module: Pod::XBuilder::XcodeProjHelper

Includes:
PodUtil
Included in:
Pod::XBuilder
Defined in:
lib/cocoapods-framework/xbuilder/xcodeproj_helper.rb

Instance Method Summary collapse

Methods included from PodUtil

#build_static_sandbox, #fix_header_file, #generic_new_podspec_hash, #installation_root, #installation_root_muti, #muti_config_with_file, #podfile_from_muti_configs, #podfile_from_spec, #spec_with_name, #spec_with_path, #to_native_platform

Instance Method Details

#modify_xcode_project_sdk_to_simullator(path) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/cocoapods-framework/xbuilder/xcodeproj_helper.rb', line 6

def modify_xcode_project_sdk_to_simullator path
  sdks = xcode_sdks
  project = Xcodeproj::Project.open path

  project.targets.each do |target|
    simulator_sdk = to_native_simulator_platform target.sdk
    if not simulator_sdk.nil?
      canonicalName = sdks[simulator_sdk]["canonicalName"]
      target.build_configurations.each do |configuration|
        configuration.build_settings["SDKROOT"] = canonicalName
      end
    end
  end
  project.save
end