question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Cordova plugins with Electron platform support

See original GitHub issue

I have a cordova plugin which supports electron platform, together with android and ios platforms. The plugin has electron entry in its plugin.xml and a source file in ./src/electron folder.

When I do npx cap sync

the sync correctly recognizes this cordova plugin for android and ios and copies it to the appropriate folders in native projects:

  • ./android/capacitor-cordova-android-plugins/ for android, and
  • ./ios/capacitor-cordova-ios-plugins/ for ios.

However, no such thing happens for electron, nothing is copied as far as I can tell. I also tried npx cap sync @capacitor-community/electron but the cordova plugin isn’t copied either.

When I try npx cap ls a part of the output says [info] Listing plugins for electron is not possible.

Is this feature implemented, or is it even possible to implement?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
IT-MikeScommented, Dec 8, 2020

Any progress related? I wanted to make an application that would list and give the user the possibility to open the file through the app, it would use this plugin (supports electron), do you know if there is another way for me do this with the electron capacitor?

You could use electron API’s directly (see https://www.electronjs.org/docs/api/dialog) or a capacitor plugin ( see https://capacitorjs.com/docs/apis/filesystem )

1reaction
IT-MikeScommented, Aug 27, 2020

I havent looked into using cordova plugins with electron, but I will add this to the future plans list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron Platform Guide - Apache Cordova
All browser-based plugins are usable with the Electron platform. When adding a plugin, if the plugin supports both the electron and browser platform,...
Read more >
How do I create a cordova plugin targeting electron platform?
Cordova seems to support the electron platform, and just executing cordova platform add electron it was able to create a window containing the ......
Read more >
Cross-Platform development with Cordova and Electron
With this framework, we can deploy to multiple platforms using a single ... Take advantage of existing browser supported Cordova plugins.
Read more >
Cordova Electron
When adding a plugin, if the plugin supports both the electron and browser platform, the electron portion will be used. If the plugin...
Read more >
cordova-electron - npm
electron apps as a target for cordova developers. Latest version: 3.1.0, last published: 7 months ago. Start using cordova-electron in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found