How to get file paths in a Dioxus macOS app when using "Open with..." #4940
Replies: 1 comment
-
|
I resolved it myself. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am creating an image viewer for macOS using Dioxus.
To improve the app's usability, I want to implement a feature where the app can be opened directly by clicking on an image file. Specifically, I want users to be able to select an image file in the Finder, use the "Open with..." feature, and have that image display in my viewer app.
I understand that I need to include a custom Info.plist in the app bundle to handle this. However, I don't understand how my application can receive the file path(s) passed to it on launch (i.e., the file that was used to open the app).
If you have any example code of how to retrieve these file paths when the app starts, I would greatly appreciate it if you could share them.
For reference, my development environment is:
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions