Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more specific about how to run liveReload #163

Open
Suven opened this issue Jul 30, 2015 · 3 comments
Open

Be more specific about how to run liveReload #163

Suven opened this issue Jul 30, 2015 · 3 comments

Comments

@Suven
Copy link

Suven commented Jul 30, 2015

Hey,

I am unsure about wether liveReload is an Emulator-only or on-device feature (on Android).

If it is an on-device feature: In which order do I need to execute the cli-tasks?

I tried the following:

  1. ember serve
  2. ember cordova run -platform=android

The problem with this is that the App then tries to locate a ember-cli-live-reload.js under file:// which is not present.

When using ember cordova:build instead of run, it does not even try to include this file, or to open a socket.

That's how my env is set:

cordova: {
      rebuildOnChange: false,
      emulate: false,
      platform:'android',
      emberUrl:'http://192.168.178.36:4200',
      liveReload:{
        enabled:true,
        platform:'android',
      },
} 
@Suven
Copy link
Author

Suven commented Jul 31, 2015

I got it working on iOS, but am still struggeling with Android. It seems that on Android all files are always still served from the file-assets-folder instead of the remote location.

I am using Cordova 5 and this changed env-settings:

// Debugging
remoteDebugHost: '192.168.178.29',
remoteDebugScheme: 'http',
cordova: {
  emberUrl: 'http://192.168.178.29:4200',
  rebuildOnChange: false,
  emulate: false,
  liveReload: {
    enabled: true,
    platform: 'android'
  }
},

As a workaround I am currently replacing the content-src in the config.xml with my dev-machines ip which enables me to use liveReload. This has the downside of requireing me to run cordova run, which skips all ember-cordova-cli tasks.

@mauricioac
Copy link

Just made a PR for this
#170

I only tested on Android. Would be nice to get some feedback with iOS

@Suven
Copy link
Author

Suven commented Sep 30, 2015

Thanks @mauricioac !

I will definitely check this out on both platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants