lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
# Creates a script that copies the resources to the bundle of the client
# target.
#
# @note   The bridge support file needs to be created before the prefix
#         header, otherwise it will not be added to the resources script.
#
# @return [void]
#
Creates a script that copies the resources to the bundle of the client
target.
Creates a script that copies the resources to the bundle of the client target .
def create_copy_resources_script
        path = target.copy_resources_script_path
        file_accessors = target.pod_targets.map(&:file_accessors).flatten
        resource_paths = file_accessors.map { |accessor| accessor.resources.flatten.map { |res| res.relative_path_from(project.path.dirname) } }.flatten
        resource_bundles = file_accessors.map { |accessor| accessor.resource_bundles.keys.map { |name| "${BUILT_PRODUCTS_DIR}/#{name}.bundle" } }.flatten
        resources = []
        resources.concat(resource_paths)
        resources.concat(resource_bundles)
        resources << bridge_support_file if bridge_support_file
        generator = Generator::CopyResourcesScript.new(resources, target.platform)
        generator.save_as(path)
        add_file_to_support_group(path)
      end
def create_copy_resources_script path = target . copy_resources_script_path file_accessors = target . pod_targets . map ( & :file_accessors ) . flatten resource_paths = file_accessors . map { | accessor | accessor . resources . flatten . map { | res | res . relative_path_from ( project . path . dirname ) } } . flatten resource_bundles = file_accessors . map { | accessor | accessor . resource_bundles . keys . map { | name | "${BUILT_PRODUCTS_DIR}/#{name}.bundle" } } . flatten resources = [ ] resources . concat ( resource_paths ) resources . concat ( resource_bundles ) resources << bridge_support_file if bridge_support_file generator = Generator :: CopyResourcesScript . new ( resources , target . platform ) generator . save_as ( path ) add_file_to_support_group ( path ) end
Creates a script that copies the resources to the bundle of the client
target.
Creates a script that copies the resources to the bundle of the client target .
None
void
note
The bridge support file needs to be created before the prefix header, otherwise it will not be added to the resources script.
The bridge support file needs to be created before the prefix header otherwise it will not be added to the resources script .