Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocoaPods Adds a Resource Bundle Scheme on Each pod install Invocation #1338

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides


###### Bug Fixes ###### Bug Fixes


* Resource bundle targets are now namespaced with the label prefix (consisting of integration target name and the source pod name).
This prevents the creation of multiple targets with the same name.

[Blake Watters](https://github.com/blakewatters)
[#1338](https://github.com/CocoaPods/CocoaPods/issues/1338)

* Solved outstanding issues with CocoaPods resource bundles and Archive builds: * Solved outstanding issues with CocoaPods resource bundles and Archive builds:
1. The rsync task copies symlinks into the App Bundle, producing an invalid app. This change add `--copy-links` 1. The rsync task copies symlinks into the App Bundle, producing an invalid app. This change add `--copy-links`
to the rsync invocation to ensure the target files are copied rather than the symlink. to the rsync invocation to ensure the target files are copied rather than the symlink.
Expand Down
Expand Up @@ -91,7 +91,8 @@ def create_copy_resources_script
UI.message "- Generating copy resources script at #{UI.path(path)}" do UI.message "- Generating copy resources script at #{UI.path(path)}" do
file_accessors = library.pod_targets.map(&:file_accessors).flatten file_accessors = library.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_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 resource_bundles = library.pod_targets.map { |pod_target| pod_target.file_accessors.flatten.map { |accessor| accessor.resource_bundles.keys.map { |name| "${BUILT_PRODUCTS_DIR}/#{pod_target.label}-#{name}.bundle" } } }.flatten

resources = [] resources = []
resources.concat(resource_paths) resources.concat(resource_paths)
resources.concat(resource_bundles) resources.concat(resource_bundles)
Expand Down
Expand Up @@ -68,7 +68,7 @@ def add_resources_bundle_targets
file_references = paths.map { |sf| project.reference_for_path(sf) } file_references = paths.map { |sf| project.reference_for_path(sf) }
group = project.group_for_spec(file_accessor.spec.name, :products) group = project.group_for_spec(file_accessor.spec.name, :products)
product_group = project.group_for_spec(file_accessor.spec.name, :resources) product_group = project.group_for_spec(file_accessor.spec.name, :resources)
bundle_target = project.new_resources_bundle(bundle_name, file_accessor.spec_consumer.platform_name, product_group) bundle_target = project.new_resources_bundle("#{library.label}-#{bundle_name}", file_accessor.spec_consumer.platform_name, product_group)
bundle_target.add_resources(file_references) bundle_target.add_resources(file_references)


library.user_build_configurations.each do |bc_name, type| library.user_build_configurations.each do |bc_name, type|
Expand Down