Skip to content
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

Even more correct xcframework paths #10865

Merged
merged 1 commit into from Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cocoapods/generator/copy_xcframework_script.rb
Expand Up @@ -161,7 +161,7 @@ def script
local basepath="$1"
local name="$2"
local package_type="$3"
local paths=("${@:3}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point to or add a comment that gives an example of how these four arguments are parsed?

Copy link
Contributor Author

@dnkoutso dnkoutso Aug 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes basically:

install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterCrashes.xcframework" "AppCenter/Crashes" "framework" "ios-arm64_arm64e_armv7_armv7s" "ios-arm64_x86_64-maccatalyst" "ios-arm64_i386_x86_64-simulator"

We used to pass all arguments including "PODS_ROOT...." and "framework".

Those are being processed by the select_slice method.

While in most cases this is fine and causes no issues (except extra cycles to process bad paths) this did cause an actual issue #10430

In the issue PODS_ROOT had x86_64 within its folder name throwing off our select_slice script and ultimately failing the build.

This change ensures we grab remainder of args after "framework". In a previous PR of mine I did @:3 which was fixing #10430 but we were still passing "framework" so I was off by one which this PR right here fixes.

local paths=("${@:4}")

# Locate the correct slice of the .xcframework for the current architectures
select_slice "${paths[@]}"
Expand Down