Is there a way to use cypress to open an electron desktop application? I know Cypress can run within an electron browser, but my application is an actual app that is downloaded, installed and run from the desktop.
Related
I am developing on macOS.
When running the app on the command line with
npx electron .
If I ues applescript to pass some system events such as "set the window position". The electron app won't handle it.
Note that, if I bundle the app with electron/forge, then the produced applications works fine.
I'm building an app with Ionic 6 + capacitor. It works fine when testing on the browser and the Android build. However, when I try to build it using XCode it just doesn't work: it only shows a blank page.
If I run the command ionic capacitor run ios -l --external from Webstorm, the iphone emulator starts and everything works fine. If I open the project with XCode and click the play button, it shows the emulator with a blank page.
My capacitor.config file is:
{
"appId": "com.ionic.app",
"appName": "ionic-app",
"webDir": "www",
"bundledWebRuntime": false,
}
The console of XCode when starting the app is:
2021-12-30 17:09:09.817042+0100 App[22182:360758] KeyboardPlugin: resize mode - native
⚡️ Loading app at capacitor://localhost...
⚡️ [log] - Angular is running in development mode. Call enableProdMode() to enable production mode.
⚡️ WebView loaded
⚡️ To Native -> App addListener 101717497
Notice that localhost doesn't show the usual 8100 port.
The problem is that when I run the app via XCode, the angular server is not starting, hence the app is only a blank page. If I start the server via ng run app:serve --host=0.0.0.0 --port=8100 and I add the following config to capacitor.config in XCode:
"server": {
"url": "http://localhost:8100"
}
Then everything works fine again.
Is there any command or any capacitor config I would need to include to start the angular server when the app starts? Or I don't need to start it and the problem may be somewhere else?
Thanks in advance
UPDATE:
The problems seems to be in the auth guard. I still have to find out what exactly causing the problem, but without the guard the app works fine.
You can run 2 ways your project:
Live Reload
Built app
Live Reload is a good way for debugging the Mobile App, because you will see the changes in 1 sec.
For Built app, you need to do a lot of process:
Run ng build and check where it's build (usually dist/nameoftheproject)
Go to capacitor config.ts and change "webDir": "www" to webDir: "dist/nameoftheproject"
Remove the server property in capacitor.config.ts (It's only for Live Reload)
Run npx cap sync
Then npx cap open ios for opening Xcode
Now, that's why people prefer using "Live Reload" for debugging because using the "Built app way" it's too long to see every change.
Edit: In fact, when you finish your app, you need to build it again if you plan to publish it on the App Store.
So that's how you will see your app in Xcode. Good luck! <:)
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
I'm trying to make an update app feature for an electron app I'm working on. I am able to download the installer for the update, but when I try to run the installer I get this message:
Is there something that I need to do in order for the installer to not be flagged as unsafe?
Side Note: When I download the installer using chrome, it works just fine. But when I download it using my electron app, it shows that windows defender popup.
Sign your installer package to avoid smartscreen filtering. https://github.com/electron/windows-installer#sign-your-installer-or-else-bad-things-will-happen
My iOS emulator is no longer opening when I run "phonegap run ios" in the terminal on Mac OS X. I receive no error messages and:
[phonegap] Platform "ios" deployed to emulator.
[phonegap] successfully installed onto emulator
While this is currently a known bug, you can run the emulate command more directly (note you need to build separately):
phonegap local build ios
/platforms/ios/cordova/emulate
You can also run the application using the same technique:
phonegap local build ios
/platforms/ios/cordova/run
NOTE: When using this method to run the app on your phone, the task might get stuck on the splash screen. To fix this, launch the Activity Monitor on your Mac and quit any processes with the name "ios-deploy". From there you can launch the application on your phone by clicking the application icon.
Or, you can even look inside the generated /platforms/ios folder and launch XCode project directly to test in an emulator or on your device. Open project and click the RUN button.
IMPORTANT: with all of the above methods, you MUST run the build command before running:
phonegap local build ios
Not really an answer, but I can say this is a known bug. Here is the bug so you can track it:
https://issues.apache.org/jira/browse/CB-5103
I only had this problem after upgrading to 3.1. I downgraded to 3.0 and it works more reliably:
npm uninstall -g phonegap
npm install -g phonegap#3.0
Also had to delete the platform/ios dir and plugins/ios.json and then run 'phonegap build ios' and 'phonegap run ios'