Skip to content

Track: SPM Bundle.module doesn't work for macOS app bundles #37

Description

@productdevbook

Summary

This issue tracks a known Swift Package Manager limitation where Bundle.module accessor doesn't work correctly for macOS app bundles built via CLI.

Upstream Issue

Problem

SPM generates Bundle.module accessor that:

  1. Checks app root (Bundle.main.bundleURL) - ❌ macOS apps use Contents/Resources/
  2. Checks hardcoded build path - ❌ Doesn't exist on user's machine

Current Workaround

We patch KeyboardShortcuts source in .build/checkouts/ during build:

  • Add modulePatched that checks Bundle.main.resourceURL first
  • Replace .localized.localizedPatched

See: scripts/build-app.sh

Related

Resolution

This can be closed when:

  1. SPM fixes the upstream issue, OR
  2. We migrate to Xcode build (which handles this correctly)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1 - HighHigh priority features or important bugsbugSomething isn't workingcoreCore functionality/backendsize: largeLarge effort (> 2 days)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions