-
-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open Custom File Extension (MacOS CFBundleTypeExtensions) #569
Comments
I am not familiar with this API, but this definitely should be implemented. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jmitchel3 can you explain more |
I wanted to add an update here based on something that's nearly working with OPTIONS = {
"argv_emulation": True,
...
"plist": {
'CFBundleName': "MyApp",
'CFBundleDisplayName': "MyApp",
'CFBundleGetInfoString': "App it Up",
'CFBundleIdentifier': "com.example.app",
'CFBundleVersion': "0.1.0",
"CFBundleTypeRole": "Editor",
"CFBundleTypeExtensions": ["appy-mc-apperson"],
"CFBundleTypeIconFile": "icon.icns",
'CFBundleShortVersionString': "0.1.0",
'NSHumanReadableCopyright': u"Copyright © 2020, Justin Mitchel, All Rights Reserved"
},
} Once you have When you open your file extension, in this case I called it Once you select your pywebview built app,
This If your app is not open, it works! (without changes to I'd guess that I think we still need to solve:
|
For anyone that stumbles upon this issue, you can solve the above issue by following these three steps:
Here's a minimal change to the hello world pywebview script that shows the idea. app.py
setup.py
|
For anyone else reading this, I made a tangentially related discussion question here: #1553 The handlers there can be used to handle the FileOpen Apple Event with the default GUI framework |
Specification
Description
First off. This is an amazing project. Thank you for creating
pywebview
!!An event handler for when a file is opened for a specific file extension/type in macOS I believe it's
CFBundleTypeExtensions
in the plist. I'm able to get pywebview to open using this setting but unable to handle the file being opened. Here's theplist
argument I'm passing insetup.py
:The
appy-mc-apperson
represents something likemy-project.appy-mc-apperson
to, ideally, re-open our application and re-load the project. For context,.appy-mc-apperson
is an arbitrary extension I made up for this post.This works in Electron fairly simply as you can see here under
fileAssociations
. This would allow pywebview apps to resume projects that are being worked on which would be key for several projects I'm working on.Practicalities
-YES. Happy to help however I can.
-YES. I am prepared to support this issue financially within reason of course. I'm trying not to use Electron as much since it's so bloated especially for tiny projects.
The text was updated successfully, but these errors were encountered: