Swift Bundler: create macOS apps with SwiftPM instead of Xcodeproj's

Hi all!

I recently released v2.0.0 of Swift Bundler — A tool for creating macOS apps with Swift packages instead of Xcodeproj's. This release sports a whole new suite of features such as package templates, and a delightful revamped CLI experience.


Escape Xcode

As Swift support in VSCode & Co improves there is real value in being able to free our projects from the bounds of Xcodeproj's. Many of us know exactly how frustrating it is when syntax highlighting breaks, auto complete stops working or Xcode crashes and we can't do anything to fix it. VSCode and many other code editors are open source (along with their extensions) and the community can easily step up and fix bugs.

However, if you still want to use Xcode, Swift Bundler has excellent support for running and building through Xcode.

A cross-platform future

In the future I hope to add support for other platforms such as Linux, Windows, iOS, Android and more (contributions welcome :wink:). Along with an easy to use cross-platform UI framework (such as my WIP SwiftCrossUI) I believe that Swift could be a great language for developing performant and native cross-platform apps.

Easy to use with CI

Xcodeproj's can be a bit cumbersome to use with CI solutions such as GitHub Actions in my experience (with code signing and all). In contrast, Swift Bundler is extremely easy to use:

    runs-on: macos-latest
      # ...
      - run: |
          curl -o swift-bundler -L https://github.com/stackotter/swift-bundler/releases/download/v2.0.2/swift-bundler
          chmod +x ./swift-bundler
      - run: ./swift-bundler bundle -c release -o . -u
      # ...


I won't have much time to work on new Swift Bundler features for a few weeks, and I would be very grateful if anyone wants to try their hand at adding support for a new platform, codesigning, sandboxing or any other features you can think of.


When rewriting Swift Bundler I decided to use it as a playground for trying out a more functional style of Swift programming with precise error handling at its core, and I think it would definitely be useful for anyone involved in the precise error handling discussion to take a look and see a real-life example of precise error handling in action in Swift with the currently existing utilities. I think it would help with identifying the current points of friction that prevent most people from using precise error handling in tools and internally within frameworks.

Example use case

For an example of using Swift Bundler in a large real-world project, see Delta Client.