Skip to content

Order onnxruntime embed-removal script after codesign - #139

Merged
sanylax0 merged 1 commit into
mainfrom
claude/onnxruntime-codesign-race
Sep 10, 2026
Merged

sanylax0 merged 1 commit into
mainfrom
claude/onnxruntime-codesign-race

Conversation

@ShawnMadadha

Copy link
Copy Markdown
Contributor

Problem

The Remove embedded static onnxruntime post-build script declares no input files, so Xcode's build system is free to schedule it concurrently with the Sign onnxruntime.framework task. When the delete lands mid-sign, the build fails:

CodeSign .../Continuity.app/Frameworks/onnxruntime.framework
  replacing existing signature
  .../onnxruntime.framework: No such file or directory
Command CodeSign failed with a nonzero exit code

Reproduced on a local device build (Xcode 26 / iOS 26.5 SDK); the retry built clean — it's a scheduling race, so CI has been winning it by luck.

Fix

Declare each stub framework's _CodeSignature/CodeResources as an inputFiles entry on the script phase, creating a dependency edge that sequences the delete after signing completes. basedOnDependencyAnalysis: false is unchanged, so the script still runs every build.

Verified xcodegen generate emits the expected inputPaths in the generated phase.

🤖 Generated with Claude Code

The 'Remove embedded static onnxruntime' post-build script declares no
inputs, so the build system may run it concurrently with the framework
signing task. When the delete lands mid-sign the build fails with
"CodeSign failed ... onnxruntime.framework: No such file or directory".

Declare each stub framework's _CodeSignature/CodeResources as an input
file so the delete is sequenced after signing completes.

@sanylax0 sanylax0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're mom gay

@sanylax0
sanylax0 merged commit 865b0ab into main Sep 10, 2026
1 of 4 checks passed
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.

2 participants