You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a GUI application with Bevy and bevy_egui, and I'm using cargo-packager to create both Windows and macOS packages. My application uses a custom file extension.
On Windows, when a user double-clicks one of these files, the file path is correctly passed to the application as a command-line argument. I can then read this argument and open the file without any issues.
On macOS, however, the behavior is different. While the app is correctly associated with the custom file type and launches when I double-click a file, it does not receive the file path. Instead, macOS displays the following error message:
"The document “test_file.myext” could not be opened. cannot open files in the "” format."
I understand that macOS handles these file-opening events through specific Apple Events (specifically the open-file event) rather than command-line arguments.
My question is: what is the correct or recommended way to listen for and handle this open-file event within a Bevy application?
Any guidance on how to properly implement this would be greatly appreciated.
A-WindowingPlatform-agnostic interface layer to run your app inO-MacOSSpecific to the MacOS (Apple) desktop operating system
1 participant
Converted from issue
This discussion was converted from issue #20771 on September 01, 2025 21:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm developing a GUI application with Bevy and bevy_egui, and I'm using cargo-packager to create both Windows and macOS packages. My application uses a custom file extension.
On Windows, when a user double-clicks one of these files, the file path is correctly passed to the application as a command-line argument. I can then read this argument and open the file without any issues.
On macOS, however, the behavior is different. While the app is correctly associated with the custom file type and launches when I double-click a file, it does not receive the file path. Instead, macOS displays the following error message:
"The document “test_file.myext” could not be opened. cannot open files in the "” format."
I understand that macOS handles these file-opening events through specific Apple Events (specifically the open-file event) rather than command-line arguments.
My question is: what is the correct or recommended way to listen for and handle this open-file event within a Bevy application?
Any guidance on how to properly implement this would be greatly appreciated.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions