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.
Related
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 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.
I'm using Expo to code my apps with React-Native. I can test my apps on Android devices running them from the Expo client app or building an APK and running it as standalone.
On iOS I can run my app from the Expo client but I couldn't find a way to run the app as standalone. In this case, I would like to test the "native" facebook login functionality.
Is it possible to run an app as standalone (without using the Expo client) on iOS?
Note: I'm trying to avoid going through TestFlight for this, that will make my workflow painfully slow. I am using Mac OS.
Run expo build:ios -t simulator to create an iOS standalone simulator build.
Wait for build to finish, then download and unpack YourAppName.tar.gz
Start an iOS simulator and run xcrun simctl install booted YourAppName.app
When I run cordova run ios --emulator the script exits successfully and tells me, that there's a file (console.log) inside platforms/ios/cordova but there's no such file although I used console.log several times in my code.
Also, Safari does not show my device in the developer menu when it's connected via USB and running the app. I used cordova run ios --device to run the app.
Am I looking in the wrong place? Does the script lie? :D
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'