How to run Electron Application as a Windows Service - javascript

I have an Electron Desktop App currently being started via npm run start
I want to turn this into a windows service so that it will start up automatically upon login. Is there any way to do this?

You want to Google "Run and RunOnce Registry Keys."

Related

React native App fails to launch after buid

guys, I'm totally new here and I'm hoping I really get the help I need 🙏🏼
I built an apk package with eas build -p android --profile test, the build was successful. App installed successfully on mobile but it fails to open. once clicked, it just opens then immediately closes back.
I’m all new to expo and development in general.
I saw a documentation to run the app via npx expo start --no-dev --minify ; as this mimics production mode in local server. I did that and It returns a “uncaught error: java.lan.exception:failed to load all assests” I reloaded like 4 times and app opens fine after that. And does not bring the error again when I rebundle app.
However I have observed it brings the error (java.lang.exception:failed to load all assests) once everytime I stop and restart the expo server.
But app doesn't launch at all when I build to standalone.
Please help here, how do I fix this? 🙏🏼
This is the way I solved it
Follow the steps.
1.) Turn on USB Tethering & USB Debugging Mode in your mobile.
2.) Connect your mobile to your laptop through USB.
3.) Verify the connection options on your device, I just added WIFI bridge / I assume i the same as wifi debugging and then, restarted the device and run expo and it worked.
Above solution is worked for me.

message passing between cli script and chrome extension

I'm reading about native messaging in chrome extensions. I want to create an extension that will comunicate with a cli script and have the ability to start and stop it. I want also to integrate a counter badge that will inform me about updates from the cli script. Is this possible or I need to write an electron app to achive this?

ElectronJS autostarting for current user but not for all users on machine

I have create a electronJS application (for windows) which should be auto launch on login and restart. Application installer is machine wide (not only for current user). This is working fine for current user from which application is installed but when i login from other user of machine, application is not auto launching i have to open the application manually and after that application will start auto launching when user will login or restart. i want application to auto launch for all users without opening it manually for first time
I didn't find any option to do the mentioned above in electron's setLoginItemSetting API also not in npm auto-launch package. So i did it by installer.nsh file. By this file when installation complete it insert value into windows registry and on uninstall it removes the value from registry. Hope this will help!

Unable to install react native application on my iOS device

I have built a React Native app on Mac OS. I can build the app on device, but when I eject the cable, the app is disappeared. I want this app to stay in my phone permanently but it doesn't.
You need to create a production build of your app to make it "stay".
Visit this link https://facebook.github.io/react-native/docs/running-on-device
Select iOS & Mac OS
Scroll down to 3. Build app for release and follow the instructions there.
You can then use the release file to install the app permanently on your device.
For me, I had the previous version of the app still running in the background when trying to install. I quit the app in the background and the installation succeeded.

React Native dev build on device expires?

I am not sure if this is a thing, or possibly and issue. I am hoping others have experienced it. But every time I put a dev build on my iphone through xcode, the app works fine on the device while unplugged from the computer for about a week. Then the app crashes at the splash screen. Every dev build of an app I have loaded on my device has done this. Even example apps I have downloaded from the web.
Does a development build of the app expire, or maybe the certificates expire or some other issue that causes the app on the device to start crashing after its been on the device for a certain time?
Solution 1: Turn off the WiFi on your iPhone or just make sure your phone and your PC are not on the same WiFi Network.
Solution 2: Run your app on the device using a Static Js bundle. To build static bundle follow these instructions for running on device via static bundle
Reason: This happens because when your phone and PC are on the same WiFi network then the app on phone tries to connect to the app development server to load the latest Js bundle, but when it could not connect to development server or could not fetch the latest Js bundle then the app crashes. By turning off your WiFi or changing the Wifi network causes the application to load the pre-build bundle and prevents the app from crashing.
I ran into the same thing and finally figured it out. If you're using a Xcode provisioning profile instead of signing up for the Apple Developer Program and paying yearly then what you're doing is getting a temporary profile that lasts about a week. Once it expires, any device with the app installed will stop working until you rebuild it with the new profile. You can see your profile/expiration if you go to General->Signing and click the 'i' next to provisioning profile.
I hope If app is opening to splash screen then there is no wrong with application building. After Splash are you going to use any web services or related to your localhost site. If yes then definitely issue is there.
Let me know if it is helpful .
When build on your phone, you want to change your scheme to Release. Please follow this https://facebook.github.io/react-native/docs/running-on-device.html, which will show you how to change your scheme to Release.
If you did lots of upgrade when developing, you might want to delete the node_modules folder, and do a clean npm install again, prior to build on phone process.

Categories

Resources