Writing native swift into electron app for background process


Hi. I am looking to build an activity monitor application that tracks the apps that a user has open. I was able to build this in apple script quite easily, but now I want to make a nice UI for it using electron. I have tried electron “soap” which uses node child process to execute a apple script, but I dont like that idea. I would rather find a way to package swift code into the electron app and run that in the background.

Does anyone know how to accomplish this? Any ideas on best practices?

Thanks in advance!


I subscribe to the issue!

I think it would be great to be able to run a background process written in С/С++/golang and to be able to communicate with him via TCP or Unix socket.

If will be the opportunity to integrate another application into an electron which is started and stopped with the main application, it would be a new step in the evolution of electron!


This suggests it may be possible: http://stackoverflow.com/questions/38544576/swift-with-electron-on-macos/38677309#38677309