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
Getting .xcassets compilation to work for development pods? #1549
Comments
Indeed, this is a bug. Instead of passing one dir to |
I think that we should leverage the list of the resources as generated by CocoaPods otherwise we might include non used xcassets files. |
Ah yeah, that’s an even better idea. |
@ryanwmarsh I have an email saying you replied to this ticket, but can’t find it here. Anyways, it’s just as well to do a separate PR for this. Whatever works best for you. Thanks for the work! |
This issue looks like my problem with cocoapods & asset catalogs : I have an XCode project with a few targets, each target has its own asset catalog. After using cocoapods 0.28 the app shows images from the wrong asset catalog so targets get built with the wrong asset catalog. Any advice how to fix this ? |
@fvvliet Our current solution has been to delete the .xcasset folder that belongs to any target we are not building for. You have to actually delete the folder from the filesystem, removing it from the project is not enough. |
…/CocoaPods#1549 to be fixed) + some other minor issues
Issue has been confirmed by @neonichu |
Is there any workaround solution for this? I am using 0.30.0 and I am still having the same problem. |
The workaround I've currently found to avoid compilation of all .xcassets in the project is to modify Pods-resources.sh to search recursively for *.xcassets not in the current directory (i.e. root project directory), but in ./Pods directory. |
Thanks for the tip on modifying Pods-resources.sh, but searching on ./Pods didn't work for me. I added a second path to the actool invocation using the path of my local cocoapod. find "../mylocalpod" "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" |
Allow support for pods with xcasset bundles using `:path`. Closes CocoaPods#1549 Closes CocoaPods#3384 Closes CocoaPods#3358
The newly added compilation of a pod's xcassets uses the following shell script to find and compile any *.xcassets folder relative to the current (presumably the project's) directory:
When using development pods however, it's unlikely that they're in a subfolder of the project directory, rather you'll have them somewhere higher up your folder structure. There are two references to the current folder, one
find .
and onefind "${PWD}"
.Shouldn't this script accomodate for the case of development pods, somehow referencing the specs and subspecs of a project's dependencies?
The text was updated successfully, but these errors were encountered: