Skip to content

fix(ios): force static linkage on SPM library products to prevent wra…#545

Open
Adityakk9031 wants to merge 1 commit into
RunanywhereAI:mainfrom
Adityakk9031:#437
Open

fix(ios): force static linkage on SPM library products to prevent wra…#545
Adityakk9031 wants to merge 1 commit into
RunanywhereAI:mainfrom
Adityakk9031:#437

Conversation

@Adityakk9031

@Adityakk9031 Adityakk9031 commented Jul 12, 2026

Copy link
Copy Markdown

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, and RABackendONNX.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 generated Info.plist files, leading to automated App Store Connect rejections.

Proposed Solution

We explicitly declare type: .static on the library targets in both Package manifests. This forces Xcode to statically link the library targets and their associated .binaryTarget dependencies directly into the host app binary, completely bypassing the generation and copying of dynamic wrapper frameworks to the app's Frameworks/ folder.

Changes

  • Configured explicit .static linkage for RunAnywhere, RunAnywhereONNX, RunAnywhereLlamaCPP, and RunAnywhereMLX in the root Package.swift.
  • Synchronized the target declarations in the Swift SDK's Package.swift.

Verification

  • Manifest syntax checked.

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: .static on the SPM library products RunAnywhere, RunAnywhereONNX, RunAnywhereLlamaCPP, and RunAnywhereMLX in the root Package.swift and the local sdk/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.plist metadata.

Reviewed by Cursor Bugbot for commit 6e9d44b. Configure here.

Summary by CodeRabbit

  • Build & Integration
    • Swift package libraries now use static linking for the core SDK and supported runtime modules.
    • This provides more predictable library integration for applications consuming the Swift package.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Both Swift package manifests now explicitly declare the RunAnywhere and backend library products as static libraries.

Changes

Static Library Product Configuration

Layer / File(s) Summary
Static product declarations
Package.swift, sdk/runanywhere-swift/Package.swift
The four exported products in each manifest now explicitly use type: .static.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

  • Issue 437 — The static product declarations implement the issue’s objective of preventing improper framework embedding.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and rationale, but it omits most required template sections like Type of Change, Testing, Labels, Checklist, and Screenshots. Add the missing template sections and checkboxes, especially Type of Change, Testing, Labels, Checklist, and Screenshots.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: forcing static linkage for SPM library products.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Successfully merging this pull request may close these issues.

1 participant