Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capacitor livereload not working

I can't figure out how to use livereload with ionic 4 and Capacitor on ios.

I'm running this command ionic cap run ios -l which add my local ip address to capacitor.config.json.

however, it seems like I'm missing something in here.

Note: according to Provide live-reload functionality #3130 this should work.

my environment setup:

Ionic:

   ionic (Ionic CLI)          : 4.1.0 (/usr/local/lib/node_modules/ionic)

   Ionic Framework            : @ionic/angular 4.0.0-beta.2

   @angular-devkit/core       : 0.7.3

   @angular-devkit/schematics : 0.7.3

   @angular/cli               : 6.1.3

   @ionic/ng-toolkit          : 1.0.6

   @ionic/schematics-angular  : 1.0.5

Capacitor:

   capacitor (Capacitor CLI) : 1.0.0-beta.6

   @capacitor/core           : 1.0.0-beta.6

System:

   NodeJS : v9.10.1 (/usr/local/bin/node)

   npm    : 6.4.0

   OS     : macOS High Sierra
like image 215
Meshal Alhazmi Avatar asked Dec 08 '22 14:12

Meshal Alhazmi


2 Answers

For those still struggling with his try:

ionic capacitor run ios --livereload --external

It will open Xcode automatically. Run your project and livereload should work.

Make sure that you are connected to the same WiFi on your device and computer.

like image 119
ACES Avatar answered Dec 10 '22 04:12

ACES


Thanks to Julio Cesar form ionic team for pointing this out, this turned to be a bug in Capacitor which has a PR already github.com/ionic-team/capacitor/pull/741 and github.com/ionic-team/capacitor/pull/742

like image 29
Meshal Alhazmi Avatar answered Dec 10 '22 03:12

Meshal Alhazmi