Skip to content

Fix app resource bundle crash#1

Merged
vincentkoc merged 2 commits into
mainfrom
codex/fix-app-resource-bundle-crash
May 21, 2026
Merged

Fix app resource bundle crash#1
vincentkoc merged 2 commits into
mainfrom
codex/fix-app-resource-bundle-crash

Conversation

@mbelinky
Copy link
Copy Markdown
Contributor

@mbelinky mbelinky commented May 21, 2026

Summary

Fixes a macOS settings-window crash when CrawlBar's SwiftPM resource bundle is missing from the packaged app.

The crash report showed Bundle.module asserting from CrawlBarIconFactory.bundledIcon(for:) while rendering branded icons in Settings. This replaces the direct Bundle.module access with an optional bundle lookup that falls back to drawn icons, and makes Scripts/package_app.sh fail if the expected resource bundle is not packaged.

Verification

  • swift build
  • swift run crawlbar-selftest
  • Scripts/package_app.sh
  • test -f dist/CrawlBar.app/CrawlBar_CrawlBar.bundle/google.png && test -f dist/CrawlBar.app/CrawlBar_CrawlBar.bundle/granola.png && test -f dist/CrawlBar.app/CrawlBar_CrawlBar.bundle/x.png
  • dist/CrawlBar.app/Contents/Helpers/crawlbar apps --json
  • dist/CrawlBar.app/Contents/Helpers/crawlbar metadata --json
  • dist/CrawlBar.app/Contents/Helpers/crawlbar config validate
  • git diff --check

@mbelinky mbelinky force-pushed the codex/fix-app-resource-bundle-crash branch from 6f0b33d to dc69f32 Compare May 21, 2026 16:45
@mbelinky mbelinky marked this pull request as ready for review May 21, 2026 16:57
@vincentkoc vincentkoc merged commit 24213ab into main May 21, 2026
3 checks passed
@vincentkoc vincentkoc deleted the codex/fix-app-resource-bundle-crash branch May 21, 2026 17:19
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