Prevent auto launch after install of electron app - electron

I am using the Electron framework to build an app on windows. I use electron-forge to make the setup.exe.
My problem is the following at the end of the install, the app is automatically started. I would like to prevent this behavior, but I can not find a solution anywhere.
To clarify, I am not talking about the opening of the app during the install that can be prevented by
if (require('electron-squirrel-startup')) {
app.quit();
}

Related

Electron app only runs in the background and doesn't show

I am trying to develop an Electron app in Windows 10 using boilerplate code like
https://github.com/electron-react-boilerplate/electron-react-boilerplate
https://github.com/electron-userland/electron-webpack
https://github.com/SimulatedGREG/electron-vue
https://github.com/electron-userland/electron-forge
After installing all the required modules and running the app in the dev mode using npm scripts, the electron app only runs in the background and doesn't appear.
This is a screenshot of the task manger which indicates that electron is running in the background:
but when I run the electron quick start app, it works.
Does anyone know how to solve this problem so that I can use any boilerplate
to use frameworks like React or Vue

Use Expo iOS app to test pure react native code

I want to be able to test an app created with react-native init through the expo app downloaded from the app store. How can I do this?
I'm trying to use pure react native (no expo at all) and want to test my code on my iOS device. A while ago, I was able to do this through the expo app simply by running npm start. However, now when I run npm start I only see Running Metro Bundler on port 8081..
You cannot run a project created with react-native init with the Expo app. However, you can use https://snack.expo.io/ to test plain React Native code in either the browser emulator or on your device (which will open through the Expo app) by pointing your iOS camera app at the QR code they display for you. The caveat to this is that you cannot use native modules within a Snack.
Depending on the size of your app, you can port your code over from react-native init into a freshly created expo project. I have managed to do this on several projects in the past with great success. The process can be tedious depending on the age of your dependencies however.

Electron NSIS silent uninstaller does not delete the app folder if the app is running

We build an electron app which uses electron-builder to make a NSIS installer. Everything works fine except when the uninstaller is run in silent mode and the app is still running. The observed issue is that the app is not terminated (as expected), and the installation is only partially removed.
The electron-builder version is 19.48.3, which has a hardcoded dependency on nsis 3.0.1.13, and nsis-resources 3.3.0.
The documentation says the uninstaller has to be run with an /S option, and any MessageBoxes has to have a /SD option to designate a silent result, which is the case with the app.
Is there anything else I am missing which controls the behavior in this use case?
Thanks!
I had issues with the one click installers. To overcome that I made nsis configurations like this. You can give it a try, and see if that works out for you.

Integrating React-Native to an existing App

I'd like to integrate react-native modules in already existing iOS App but keeping both solutions separately.
Instead of doing this https://facebook.github.io/react-native/docs/integration-with-existing-apps.html which modifies the existing solution, I would like to have a standalone react-native solution and somehow import the Xcode project of the react-native app into my already existing app.
This allows me to continue developing the already existing app without being affected by the RN solution which installs and add libraries to the Xcode project.
Basically the concepto would be to export the react-native solution as a bundle or static library and import it in my already existing iOS App. After that interact with this library from the already existing iOS App and also allow the React-Native Solution library interact with the already existing app. There should be a way to communicate from the already existing app to the RN Solution library and also from the RN solution library with the already existing (i.e. for launching modules from the already existing iOS app and also from the RN solution be able to launch views of the already existing app)
Is this possible?
You can do most of the things you are referring. Excuse me if a miss something...
Runninig as standalone
If you don't have ios and android folders in your RN directory, you must run react-native eject from CLI.
React-native application can be started as a standalone native app using the CLI commands below:
react-native run-ios (only on MacOS)
react-native run-android
Add --port #### if the default is being used.
Both commands will start something like a sandbox native app which will load the JS inside. It will also start the Metro bundler which will serve the js bundle as well.
Loading RN into existing app
You need to add the native RN libraries for Android and iOS as dependencies, so you can use them to load either the JS bundle from the Dev server or insert the JS bundle within the native build.
To use the dev server run react-native start.
To build the JS as a file which will be added to the native package you must run:
react-native bundle ios
Followed by couple of options
--dev false or true
--entry-file index.ios.js change this to match your entry file. It may be just index.js. Be carefull to match the name inside Java/Obj-C code.
--bundle-output ../YOUR-EXISTING-IOS-APP/main.jsbundle
--assets-dest ../YOUR-EXISTING-IOS-APP
Communication
This happens over the RCTBridge.
Check this page for a explanation and examples how to access native functionality from the RN environment.

Develop React-native IOS app

when I developed the first app I got error .I'm new to react
please help me to find a solution.
I install npm,node,flow,watchman ,homebrew
Your package server isn't running. This should start automatically when you hit run in xcode, but you can also start it manually. From the project's root, run npm start

Resources