Resolved issues with add_system_framework and SDK version #786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #769
This is a WIP PR for issues around adding system frameworks. I would like some insight as to what version of XCode this applies to. Regardless I can confirm this works for anyone using 11 & 12.
Issue
When adding a framework, it is not made obvious that in order to have it point to the right SDK folder you must set the SDKROOT. This also comes with more issues. At least in XCode 11+ the frameworks live in a unspecified SDK version folder (ex:
AppleTVOS.sdk
) with versioned symbolically linked folders (ex:AppleTVOS14.0
) pointing to the unspecified SDK folder. Therefore, the use ofLAST_KNOWN_TVOS_SDK
causes issues and links to an unknown path. Not to mention that the idea of these values being maintained is an issue of itself.You can however set the SDK root and have the frameworks get added with the correct path as commented in #769. However, when adding a target it adds either Cocoa or Foundation automatically if not a static library, which can be unintended.
I am not sure of the best approach/solution to this problem, but this at least gives some insight into the issue. What I am most concerned about here is the breaking of support for older XCode versions. Should anyone be using 11+ you can at least take these changes and with the additional info in the
README.md
on building and installing locally, you should be able to get this working.