Commit f3ad3d7e authored by Marius Rackwitz's avatar Marius Rackwitz

Merge pull request #3219 from CocoaPods/mr-restrict-xcassets-copying

Only copy the required xcasset files into the user bundle
parents 3f2db915 aba2db8b
......@@ -15,6 +15,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
* Only copy explicitly specified xcasset files into the bundle of the integrated target.
[Marius Rackwitz](https://github.com/mrackwitz)
[#3219](https://github.com/CocoaPods/CocoaPods/issues/3219)
* Correctly filter Xcode warnings about the use of dynamic frameworks.
[Boris Bügling](https://github.com/neonichu)
......
......@@ -96,6 +96,8 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=""
install_resource()
{
case $1 in
......@@ -126,6 +128,7 @@ install_resource()
xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
;;
*.xcassets)
XCASSET_FILES="$XCASSET_FILES '$1'"
;;
/*)
echo "$1"
......@@ -150,7 +153,7 @@ EOS
XCASSETS_COMPILE = <<EOS
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n $XCASSET_FILES ]
then
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
......@@ -166,7 +169,7 @@ then
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
find "${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}"
echo $XCASSET_FILES | xargs 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}"
fi
EOS
end
......
Subproject commit b4bd7ffc7d85174f507b74f35c77082536688356
Subproject commit 14f0043f48889eea924eb44b44f6f3923b68fc5f
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment