You can also setup the adb bridge over TCP such that subsequent deploys no longer need a USB cable. With port forwarding set up, an external address would no longer be required. For Android, it is possible to configure adb to always forward ports while the adb server is running (see adb reverse).You can separate the dev server process and the deploy process by using ionic serve and the -livereload-url option of ionic cordova run or ionic capacitor run.Use the -list option to list all targets. With Cordova, use the -device, -emulator, and -target options to narrow down target devices.Remember, with the -external option, others on your Wi-Fi network will be able to access your app. Then, you'll need to specify that you want to use an external IP address for the dev server using the -external flag. To use Live Reload with Capacitor, make sure you're either using a virtual device or a hardware device connected to the same Wi-Fi network as your computer. The difference is the Ionic CLI configures the Web View to load your app from the dev server on your computer. ![]() Since Live Reload requires the Web View to load your app from a URL hosted by your computer instead of just reading files on the device, setting up live-reload for hardware devices can be tricky.Īs with regular device deploys, you will need a cable to connect your device to your computer. Live Reload can also be used with Capacitor and Cordova to provide the same experience on virtual and hardware devices, which eliminates the need for re-deploying a native binary. With ionic serve, Live Reload just refers to reloading the browser when changes are made. ![]() This is particularly useful for developing using hardware devices. Using the Live Reload option will reload the browser or Web View when you change your app's code in your development environment.
0 Comments
Leave a Reply. |