diff --git a/CHANGELOG.md b/CHANGELOG.md index bbee3a41b8..5ae4c6d879 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` [MagnificentMiles](https://github.com/MagnificentMiles) [#12159](https://github.com/CocoaPods/CocoaPods/pull/12159) +* Correctly process multiple `xcframeworks` dSYMs a pod provides. + [Soumya Ranjan Mahunt](https://github.com/soumyamahunt) + [#12215](https://github.com/CocoaPods/CocoaPods/pull/12215) + ## 1.14.3 (2023-11-19) ##### Enhancements diff --git a/lib/cocoapods/generator/copy_xcframework_script.rb b/lib/cocoapods/generator/copy_xcframework_script.rb index c30f0d69c5..8446007a54 100644 --- a/lib/cocoapods/generator/copy_xcframework_script.rb +++ b/lib/cocoapods/generator/copy_xcframework_script.rb @@ -72,10 +72,19 @@ def script { local source="$1" local destination="$2" + dsyms="${source}/dSYMs" + framework_pattern="${source}/*.framework" + frameworks=($framework_pattern) + framework=${frameworks[0]} # 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/\" \"${framework}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${framework}" "${destination}" + # Copy dSYMs preserving already copied dSYMs + if [ -d "$dsyms" ]; then + echo "rsync -av \"${dsyms}\" \"${destination}\"" + rsync -av "${dsyms}" "${destination}" + fi } SELECT_SLICE_RETVAL=""