fingerproof / cordova-plugin-gapreload Goto Github PK
View Code? Open in Web Editor NEWLiveReload plugin for Cordova/PhoneGap applications.
License: MIT License
LiveReload plugin for Cordova/PhoneGap applications.
License: MIT License
I'm having a problem where my android specific config.xml gets replaced with the /config.xml after prepare, and I'm sure it has something to do with your plugin's xml. It doesn't happen on ios, and it doesn't happen without your plugin.
I noticed your plugin adds the following to my plugins/android.json (among other changes):
"config.xml": {
"/*": {
"<access origin=\"*://192.168.10.100\" />": 1,
"<access origin=\"*://$LIVERELOAD_HOST\" />": 1
}
},
This particular addition is not in my plugins/ios.json file. If I delete these lines, I do not experience the issue.
Is this an issue with your plugin (likely the xml), or is it a cordova issue?
Thank you for your help! Otherwise a very useful and fantastic plugin.
Installing this plugin appears to break cordova apps' ability to make cross origin requests. This appears to be related to how livereload actually works but it might be worth mentioning as a caveat in the docs. Maybe this issue could be mitigated using a CORS proxy?
So I save it, then run cordova prepare
and it will re-insert $SERVER_HOST again...
<gapreload>
<param name="SERVER_HOST" value="10.0.1.27" />
<param name="SERVER_PORT" value="8888" />
<param name="SERVER_HOST" value="$SERVER_HOST" />
<param name="SERVER_PORT" value="$SERVER_PORT" />
<param name="LIVERELOAD_HOST" value="$LIVERELOAD_HOST" />
<param name="LIVERELOAD_PORT" value="$LIVERELOAD_PORT" />
</gapreload>
These two options are not available on livereload v0.9.4.0 on Windows:
2) Add the *hooks*, *platforms* and *plugins* subfolders to the ignore list
3) Set `cordova prepare` as the custom command to run after changes
plugin.xml:
<dependency id="org.apache.cordova.device"/>
It appears to use this inside gapreload.js:50 to access device.platform.toLowerCase();
however the global cordova.platformId
should provide the same without the need for the dependency.
As strange as it may sound not all platforms have a working org.apache.cordova.device and Cordova project provided no easy way to unit test any plugin with fake/mocked input data from any other platform.
Hi Sebastien,
First off - thanks for the plugin! I use LiveReload when I code for the web and it's a huge time saver. I'm just starting out with PhoneGap and came across your plugin. Looks fantastic.
I've followed the steps exactly in the video, but I can't get my changes to appear in my simulator (I'm running a 4s simulator running iOS8). From what I can see, LiveReload is running the post-processing command and I think the simulator is refreshing.. it's just not reflecting the changes I make. The only major difference I notice is that my cordova server returns a bunch of 304s (with a 200 for the one file I edit) instead of a bunch of 200s like in your demo.
Have there been any changes to the cordova CLI that could be causing this? Sorry I can't provide much insight.. this is literally the first thing I'm trying with PhoneGap.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.