Class: Pod::SPM::Hook::UpdateMacroPlatforms

Inherits:
Pod::SPM::Hook show all
Defined in:
lib/cocoapods-spm/hooks/post_integrate/06.update_macro_platforms.rb

Instance Method Summary collapse

Methods inherited from Pod::SPM::Hook

#aggregate_targets, #config, #initialize, #macro_metadata_for_pod, #perform_settings_update, #pod_name_of_target, #pod_target_subprojects, #pod_targets, #podfile, #pods_project, run_hooks, #sandbox, #user_build_configurations

Methods included from Installer::InstallerMixin

#native_targets, #projects_to_integrate

Methods included from Config::SPMConfigMixin

#local_macro_pod?, #local_macro_pod_dir, #macro_pods, #spm_config

Methods included from Config::PodConfigMixin

#pod_config

Methods included from PathMixn

#prepare_dir

Methods included from Config::ProjectConfigMixin

#project_config

Constructor Details

This class inherits a constructor from Pod::SPM::Hook

Instance Method Details

#runObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/cocoapods-spm/hooks/post_integrate/06.update_macro_platforms.rb', line 8

def run
  to_save = Set.new
  native_targets.each do |target|
    name = pod_name_of_target(target.name)
     = (name)
    next if .nil?

    settings = .platform_build_settings
    target.build_configurations.each do |config|
      settings.each { |k, v| config.build_settings[k] = v }
    end
    to_save << target.project
  end
  to_save.each(&:save)
end