Repository navigation
Conversation
The relinker weak-linked a fixed list of system frameworks and set only the @executable_path/Frameworks rpath, so its load commands differed from the Xcode-built framework. Use the Xcode project's link inputs instead: name only Foundation, CoreData and, where Xcode links it, SystemConfiguration, and let autolinking add the rest. Add the @loader_path/Frameworks rpath and Xcode's dead-stripping, and set SDKROOT so the link no longer warns about the sysroot. Refs #9660
Contributor
PR risk: mediumFor commit Main concerns: dependencies customers inherit, reach, public contract. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📜 Description
The SwiftPM-built dynamic frameworks linked differently from the Xcode-built ones:
@loader_path/Frameworksrpath was missing.scripts/build-dynamic-framework.shnow uses the same link inputs as the Xcode project, so both producers emit the same dylib and rpath load commands.This also changes the released
SentryObjC-Dynamic.xcframework, which is linked by the same script.💡 Motivation and Context
Part of #9660. Customers should be able to swap the Xcode-built binary for the SwiftPM-built one without changing their setup.
It also unblocks no-UI variants (#9659): the old script always linked UIKit, SwiftUI and AppKit.
Loading tests for app extensions and embedding frameworks are still open on #9660.
💚 How did you test it?
SentryandSentryObjC.SPM-DynamicandSPM-ObjC-Dynamicpass against the new XCFramework on macOS.scripts/test-build-dynamic-framework.sh. It failed before the fix.make analyzefails locally while resolving packages, also on a cleanmain.📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.sdk_api.json,sdk_api_objc.json) reviewed by another Mobile SDK team member or implemented according to the develop docs spec.