[CP] Copy XCFrameworks script fails if the project path includes the name of a desired processor architecture #10430
Labels
r:xcframeworks
Related to the support for XCFrameworks
s2:confirmed
Issues that have been confirmed by a CocoaPods contributor
s7:workaround available
A workaround for the issue is available
t2:defect
These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone
Report
What did you do?
Attempted to build a project for an iPhone 11 device in a directory with "arm64" in the path using a cocoapod that uses an XCFramework (GoogleAppMeasurement in this case).
What did you expect to happen?
The project to build.
What happened instead?
The
select_slice
function in PODNAME-xcframeworks.sh appears to evaluate thepaths
array for possible matches for architecture slices. Unfortunately, the array contains the full path to the xcframework as its first element. I'm guessing this is a mistake, or that the array should be iterated over starting from index 1 instead of 0. Normally this is probably not an issue astarget_arch_regex
will filter out any elements that don't match the desired architectures and thetarget_variant
check will futher filter out elements that don't have "simulator" in them (if you are building for simulator). But, if that first element does pass all the checks, it will be stored inSELECT_SLICE_RETVAL
which then gets handed to thecopy_dir
function whereupon rsync fails with "No such file or directory" causing the build to fail:As a temporary fix I moved the project workspace to a directory that doesn't contain the word "arm64".
CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
https://github.com/scotthmccoy/CocoapodsRegexIssue
To reproduce the issue, move the project to a directory that matches the architecture/platform you are building for. For example, "x86_64_simulator". By default the project is in "arm_64_simulator" as that is how the issue was discovered.
The text was updated successfully, but these errors were encountered: