Class: Pod::SPM::Hook::UpdateCopyResourcesScript
- Inherits:
-
Pod::SPM::Hook
- Object
- Pod::SPM::Hook
- Pod::SPM::Hook::UpdateCopyResourcesScript
- Includes:
- UpdateScript::Mixin
- Defined in:
- lib/cocoapods-spm/hooks/post_integrate/21.update_copy_resources_script.rb
Instance Method Summary collapse
Methods included from UpdateScript::Mixin
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
Methods included from PathMixn
Methods included from Config::ProjectConfigMixin
Constructor Details
This class inherits a constructor from Pod::SPM::Hook
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cocoapods-spm/hooks/post_integrate/21.update_copy_resources_script.rb', line 10 def run update_script( name: :copy_resources_script, insert_before: Generator::CopyResourcesScript::RSYNC_CALL, content_by_target: lambda do |target| input_paths = resource_paths_for(target) output_paths = input_paths.map do |p| "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/#{File.basename(p)}" end lines = input_paths.map { |p| "install_resource \"#{p}\"" } [lines, input_paths, output_paths] end ) end |