-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Description
Description
CodexBar fails to launch with a fatal error because the resource bundle accessor looks for CodexBar_CodexBar.bundle in the wrong location.
Error Message
CodexBar/resource_bundle_accessor.swift:12: Fatal error: could not load resource bundle: from /Applications/CodexBar.app/CodexBar_CodexBar.bundle or /Users/steipete/Projects/codexbar/.build/arm64-apple-macosx/release/CodexBar_CodexBar.bundle
Root Cause
The Swift Package Manager-generated resource_bundle_accessor.swift searches for the bundle in:
/Applications/CodexBar.app/CodexBar_CodexBar.bundle(app root - incorrect for macOS app bundle)/Users/steipete/Projects/codexbar/.build/...(developer's build path)
However, the bundle is correctly placed at:
/Applications/CodexBar.app/Contents/Resources/CodexBar_CodexBar.bundle
This is the standard location for resources in a macOS app bundle.
Workaround
Creating a symlink resolves the issue:
ln -s Contents/Resources/CodexBar_CodexBar.bundle /Applications/CodexBar.app/CodexBar_CodexBar.bundleSuggested Fix
The bundle copy phase in the build process should either:
- Place the bundle in the app root alongside the
Contentsfolder, or - Override the SPM-generated resource accessor to look in
Contents/Resources/
Environment
- macOS version: Darwin 24.6.0
- CodexBar version: 0.18.0-beta.2 (build 50)
- Git commit: 6a6b598
Metadata
Metadata
Assignees
Labels
No labels