![]() ![]() Within nx monorepo it’s possible to configure app’s project.json (apps/awesome-app/project.json) using nx:run-commands executor with code like this: "sync": export default config Īnd voila - after the serve command compiles the app - you can run the app from the Android Studio (or Xcode) and after any change to JavaScript code will be made - the app will be reloaded in the emulator or device. This command will first use ionic build to. This setup is for a windows pc where you are coding and a mac that are running iOS simulator. Optionally specify the -livereload option to use the dev server from ionic serve for livereload functionality. Of course, you may use npm install - legacy-peer-deps or use “overrides” in package json.įirst of, it’s not necessary to use at all. Ionic - how-to: livereload on iOS and android Ionic Framework ionic-v3 sveinla April 24, 2016, 9:54am 1 Hi, i have seen som discussion about people have problems getting livereload to work and wanted to share how i made it work. And Node.js starting from v16 will fail to install/uninstall any package due to peer deps conflict. Android Studio or Xcode) or npx nx run yor-awesome-app:open:android and run app from ide.Īlso, at the moment the major drawback for using - it has Angular 13 in it’s peer deps list, while the latest Angular is v14. So you can manually run commands like npm run build then npx nx run yor-awesome-app:sync then manually open ide (e.g. Only capacitor cli commands like open, sync, copy. But a major drawback - it doesn’t work with ionic cli so no livereload possible. library adds capacitor cli commands to the app’s project.json. But there are a couple of workarounds that could be in help. I didn’t find a fancy way to replace ionic capacitor run - livereload command completely. You can’t just run in terminal ionic capacitor run -livereload neither from root folder nor from /apps/awesome-app Solutions The current implementation of ionic and capacitor cli are not working out of the box with nx monorepos. apps/ - awesome-app/ - android/ - ios/ - src/ - package.json // should have only dependencies part with capacitor and cordova plugin deps. ![]() So capacitor app in the nx monorepo could have such folder structure. Select your platform of choice (iOS or Android) and connect a device to your computer.By design applications in nx monorepo stored in /apps folder (and features in /libs folder). Let’s use Live Reload to implement photo deletion, the missing piece of our Photo Gallery feature. Since we need to run native plugin code on a device in order to verify that it works, having a way to quickly write code, build and deploy it, then test it is crucial to keeping up our development speed. This is particularly useful when writing code that interacts with native plugins. We can also use it when developing on iOS and Android devices. Remember ionic serve? That was Live Reload working in the browser, allowing us to iterate quickly. ![]() When active, Live Reload will reload the browser and/or WebView when changes in the app are detected. We can use the Ionic CLI’s Live Reload functionality to boost our productivity when building Ionic apps. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc) My ionic info: ionic (Ionic CLI) : 4.5. The development experience is pretty quick, but what if I told you there was a way to go faster? running ionic cordova run android -livereload or ionic cordova run ios -livereload Which ionic/app-scripts version are you using ionic/app-scripts3.2.1. Ionic 4: Error on adding -livereload when running on Android or iOS Issue 1502 ionic-team/ionic-app-scripts GitHub Skip to content Product This repository has been archived by the owner before Nov 9, 2022. So far, we’ve seen how easy it is to develop a cross-platform app that works everywhere. ![]()
0 Comments
Leave a Reply. |