Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.
abhillmanPublic archive

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macOS Documents and GUI Applications

Likely for historical reasons, macOS does not pass documents sent to application bundles as argv. This repository is a simple demo of the lack of this feature1.

What this repository does

Simply, this repository:

  1. creates an macOS Application Bundle called Toy.app2
  2. writes anything passed to argv to /tmp/argv.txt

Using butonageo/cargo-bundle

What this repository demonstrates

macOS does not pass documents in argv to app bundles when invoked; moreover cargo-bundle does not have this functionality, either.

What we'd like to accomplish:

  1. enable cargo-bundle to automatically enable macOS bundles to receive documents using argv
  2. petition Apple to offer a flag in Info.plist file to enable application bundles to receive documents, much as they do on traditional linux and other *nix systems

Why? today it is easier than ever to build cross-platform application bundles for Windows, Linux, and macOS. That said, macOS' current implementation places a large burden on developers. For example, there are 47 comments on this GitHub PR for the a GUI-harness for the neovim text editor, which consitute dozens of developer hours spent on attempting to rectify this issue.

Related this issue in the cargo-bundle codebase.

Building

git clone git@github.com:abhillman/macos-argv.git
cargo build

Footnotes

  1. Apple instead requires applications to use a bespoke message-passing implementation; see Wikipedia: Apple Events and Apple Developer Documentation: Apple Events ↩

  2. Accomplished via simply adding relevant metadata to Cargo.toml and adding the cargo-bundle crate ↩

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages