fix(ios): force static linkage on SPM library products to prevent wra…#545
Open
Adityakk9031 wants to merge 1 commit into
Open
fix(ios): force static linkage on SPM library products to prevent wra…#545Adityakk9031 wants to merge 1 commit into
Adityakk9031 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughBoth Swift package manifests now explicitly declare the ChangesStatic Library Product Configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
resolve:#437
Description
This PR resolves errors ITMS-90057 and ITMS-90208 during App Store Connect upload validation.
Root Cause
When client apps integrated the Swift targets via Swift Package Manager, Xcode evaluated the library products' default automatic linkage. In dynamic contexts, Xcode built them as dynamic wrapper framework targets (
RACommons.framework,RABackendLLAMACPP.framework, andRABackendONNX.framework), adding them to the "Embed Frameworks" build phase.Because these stubs only wrapped static library files, they lacked the required metadata keys (
CFBundleSupportedPlatforms,MinimumOSVersion,CFBundleShortVersionString) in their generatedInfo.plistfiles, leading to automated App Store Connect rejections.Proposed Solution
We explicitly declare
type: .staticon the library targets in both Package manifests. This forces Xcode to statically link the library targets and their associated.binaryTargetdependencies directly into the host app binary, completely bypassing the generation and copying of dynamic wrapper frameworks to the app'sFrameworks/folder.Changes
.staticlinkage forRunAnywhere,RunAnywhereONNX,RunAnywhereLlamaCPP, andRunAnywhereMLXin the root Package.swift.Verification
Note
Medium Risk
Linkage behavior for all SPM consumers changes (no more dynamic SDK frameworks), which can affect embed/signing setup but is intentional to fix App Store validation; no runtime source changes.
Overview
Sets
type: .staticon the SPM library productsRunAnywhere,RunAnywhereONNX,RunAnywhereLlamaCPP, andRunAnywhereMLXin the rootPackage.swiftand the localsdk/runanywhere-swift/Package.swift.This changes how Xcode links those products so SDK code and binary targets are statically linked into the host app instead of being packaged as dynamic wrapper frameworks in Embed Frameworks, which was triggering App Store Connect ITMS-90057 / ITMS-90208 when those wrappers lacked required
Info.plistmetadata.Reviewed by Cursor Bugbot for commit 6e9d44b. Configure here.
Summary by CodeRabbit