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

for-loop variable is not properly evaluated in add-framework-symbols-to-app-archive.sh #26

Closed
ken0nek opened this issue Aug 26, 2021 · 1 comment

Comments

@ken0nek
Copy link

ken0nek commented Aug 26, 2021

Problem

"$(find "${BUILD_FRAMEWORKS_DIR}" -name '*.framework' -type d)" returns one string joined with single whitespace instead of the list of framework paths. The log file in /var/tmp will be like this.

Adding framework bcsymbolmap files to the Xcode archive for target XXX.
Print: Entry, ":CFBundleExecutable", Does Not Exist

Solution

Properly iterate the variable in for-loop.

-for BUILD_FRAMEWORK_PATH in "$(find "${BUILD_FRAMEWORKS_DIR}" -name '*.framework' -type d)"; do
+BUILD_FRAMEWORKS_PATHS=($(find "${BUILD_FRAMEWORKS_DIR}" -name '*.framework' -type d))
+for BUILD_FRAMEWORK_PATH in "${BUILD_FRAMEWORKS_PATHS[@]}"; do

If this fix looks good, please update add-framework-symbols-to-app-archive.sh

Ref

@mark-sanvitale-iovation
Copy link
Contributor

I think that you are correct in identifying the potential for an execution error in this iteration of the variable contents. It also appears that the other client-side script, slim-build-frameworks.sh, might have had similar error potential. However, these scripts have been removed from the distribution as of the recent v5.3.0 release, given that we have moved to an exclusively XCFramework-based distribution, which no longer requires any custom scripting (multi-arch support and bcsymbolmap bundling are handled by the xcframework bundle). With the removal of the scripts, this issue has been (indirectly) addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants