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

Only include *.xcassets from Pods #2212

Closed
wants to merge 1 commit into from

Conversation

tomdalling
Copy link

Fixes #1546

If you had multiple xcassets anywhere underneath your root project directory, but were only picking one of them for each build, the Pods-resources.sh script would include ALL of them in the build. This could cause resources from the correct xcassets to be overwritten by all the others.

Now, Pods-resources.sh will only include the xcassets found in Pods. All other xcassets can be included in the build by adding them to the Xcode project, as per usual.

Fixes CocoaPods#1546

If you had multiple xcassets anywhere underneath your root project directory, but were only picking one of them for each build, the `Pods-resources.sh` script would include ALL of them in the build. This could cause resources from the correct xcassets to be overwritten by all the others.

Now, `Pods-resources.sh` will only include the xcassets found in `Pods`. All other xcassets can be included in the build by adding them to the Xcode project, as per usual.
@@ -137,7 +137,7 @@ def script

XCASSETS_COMPILE = <<EOS

if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find Pods -name '*.xcassets' | wc -l` -ne 0 ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [115/80]

@tomdalling
Copy link
Author

Is this sufficient to fix #1546 ? It fixes the issue for my own project, but I could be overlooking something.

@knightsc
Copy link

This is exactly what I've been using. Been working well for about 4 months. I don't have any Pods with their own image archives though. It seems like it will work fine.

@kylef
Copy link
Contributor

kylef commented Aug 6, 2014

@tomdalling I'm going to close this as a duplicate of #2323, I know this PR predates the other. But this patch has a hard-coded Pod's directory instead of using the variable ${PODS_ROOT} as found in #2323.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pods copy resource script overrides default xcasset bahaviour
4 participants