Skip to content

[codex] fix static apple xcframework packaging#19

Merged
kateinoigakukun merged 3 commits into
developfrom
codex/fix-static-apple-xcframework-packaging
Jun 30, 2026
Merged

[codex] fix static apple xcframework packaging#19
kateinoigakukun merged 3 commits into
developfrom
codex/fix-static-apple-xcframework-packaging

Conversation

@kateinoigakukun

Copy link
Copy Markdown
Member

Description

  • package static Apple builds as true static-library XCFramework entries by passing -library/-headers to xcodebuild -create-xcframework
  • keep the existing dynamic framework path unchanged
  • resolve headers from either Headers or Versions/A/Headers so the packager works across framework layouts

Motivation and Context

The current static artifact is built as an XCFramework whose slices point at onnxruntime.framework, even though the embedded binary is actually a static archive. That incorrect XCFramework shape makes Xcode/SwiftPM treat the artifact like an embeddable framework, which leads downstream apps to ship a stub onnxruntime.framework in their IPA.

This change makes static builds emit real static-library XCFramework metadata instead:

  • LibraryPath = libonnxruntime.a
  • BinaryPath = libonnxruntime.a
  • HeadersPath = Headers

That keeps the compile-time headers available while avoiding the framework-style packaging that triggers the downstream embed behavior.

Validation:

  • rebuilt the static Apple XCFramework locally with tools/ci_build/github/apple/build_apple_framework.py
  • confirmed the output XCFramework plist now advertises libonnxruntime.a slices instead of onnxruntime.framework
  • confirmed the rebuilt slices on disk are static archives

@kateinoigakukun kateinoigakukun marked this pull request as ready for review June 30, 2026 09:26
@kateinoigakukun kateinoigakukun merged commit 5d1e189 into develop Jun 30, 2026
17 checks passed
@kateinoigakukun kateinoigakukun deleted the codex/fix-static-apple-xcframework-packaging branch June 30, 2026 09:26
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