Skip to content

Commit

Permalink
Merge pull request #10884 from dnkoutso/multi_xcframeworks_fix
Browse files Browse the repository at this point in the history
Correctly process multiple `xcframeworks` a pod provides.
  • Loading branch information
dnkoutso committed Aug 25, 2021
2 parents 7b6a289 + 534a7be commit f76a08f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 32 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -12,7 +12,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`

##### Bug Fixes

* None.
* Correctly process multiple `xcframeworks` a pod provides.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#10378](https://github.com/CocoaPods/CocoaPods/issues/10378)


## 1.11.0.beta.2 (2021-08-11)
Expand Down
32 changes: 2 additions & 30 deletions lib/cocoapods/generator/copy_xcframework_script.rb
Expand Up @@ -70,8 +70,8 @@ def script
local destination="$2"
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}\\" \\"${destination}\\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}" "${destination}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}*\\" \\"${destination}\\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}"
}
SELECT_SLICE_RETVAL=""
Expand Down Expand Up @@ -130,33 +130,6 @@ def script
done
}
install_library() {
local source="$1"
local name="$2"
local destination="#{Target::BuildSettings::XCFRAMEWORKS_BUILD_DIR_VARIABLE}/${name}"
# Libraries can contain headers, module maps, and a binary, so we'll copy everything in the folder over
local source="$binary"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}/*\\" \\"${destination}\\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}/*" "${destination}"
}
# Copies a framework to derived data for use in later build phases
install_framework()
{
local source="$1"
local name="$2"
local destination="#{Pod::Target::BuildSettings::XCFRAMEWORKS_BUILD_DIR_VARIABLE}/${name}"
if [ ! -d "$destination" ]; then
mkdir -p "$destination"
fi
copy_dir "$source" "$destination"
echo "Copied $source to $destination"
}
install_xcframework() {
local basepath="$1"
local name="$2"
Expand All @@ -179,7 +152,6 @@ def script
fi
copy_dir "$source/" "$destination"
echo "Copied $source to $destination"
}
Expand Down

0 comments on commit f76a08f

Please sign in to comment.