-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Integrate with PG CLI to support custom/3rd party plugins and multiple live devices. #127
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
Comments
Multiple live devices seems to be already supported as of Phonegap |
@dotnetwise yep, a subtle and sneaky update via the PhoneGap CLI :) I haven't had a moment to blog about it, but you can now connect multiple devices and keep their states in-sync! |
I dont see any other feature requests near to this, so I ask it here, are custom plugins already supported in developer app? |
I could simply fork the source code and add my custom plugins to it. Connected to the app and voila, all my custom plugins just work. |
but if I want to use it for developing a plugin, this compile and install has to happen each time, practically no benefit compared to compiling a test project each time. |
The problem I encounter now is about Talking about the |
@mwbrooks - Delighted to hear that 3.5.0 delivers on the multi-device feature. Please pass on my thanks! @dotnetwise - Yes ... I know I can fork the code but ... I'm lazzy (See #142) and I don't want to keep maintaining stuff that I shouldn't. It's not my core business focus and I think it squarely belongs with the PG or Cordova teams. @dotnetwise If you want this app to do autoloading of PG plugins I think this is the wrong place to ask it. Firstly, I doubt it's feasible and 2ndly this feature request is not about this. The concept is to make it part of PhoneGap CLI so you can .. EITHER OR If you're constantly changing PG plugins then this feature has little value to you. |
@dotnetwise - If needed we can run multiple server instances (e.g. different port numbers) for each platform OR an alternative might be the web server to inspect the client Agent string to figure out which platform specific code to return for the virtual Remember we're also using symlinks to avoid file/folder copying and to ensure that most source file/folder changes are immediately reflected into the build directory that we're serving without the need to perform a rebuild! So for most HTML5 related file changes we can avoid doing a rebuild and just update the HTML/CSS/Image/Font source files to trigger the auto-reload on the mobile device client. During the debug build we could symlink files and folders that don't change from their source code. Alternatively, If we want to retrofit this into the existing PG build process, you can create a folder compare tool that discovers identical files and folders (say using a Merkle tree) and then replaces them with symlinks. You could instead write a post build scripts for each PG version that does the same thing but with some risk that it may not match identically with the normal build. An alternative to using symlinks is to let the web server map virtual files/folders to the source files/folders but this might not retrofit as easily to the existing PG build process and might confuse some devs when diagnosing issues. |
Looks like connect-phonegap used by 'phonegap serve' already maps these virtual paths ...
to the dynamic physical path ... It uses the platform and Cordova version sent by the client app. Just what we wanted :) . See https://github.com/phonegap/connect-phonegap/tree/master/lib/middleware/cordova/ |
Just got this all working yesterday for Win7, Android and Sencha Touch app. Testing OSX/iOS/Android today. Can now edit Sencha Touch source code and it auto loads the change on the device (We skip Sencha's compile, PhoneGap's Android compile and Android device redeployment). Using a custom PG App with different plugins. |
Basically all you need to do is create a nested folder structure containing symlinks to the part of PhoneGap you need and then run Got it working for OSX a couple of days ago. The |
My initial implementation was broken 👎 But I've since had a another crack at it and hacked the connect-phonegap package to add the needed code to do directory mapping and also written a ShellJS script to build a Sencha Touch + PG App that can morph into the PhoneGap App. This means is that I can be sure I'm using identical plugins/versions as they both run in the same app! Mostly working now. Should be all pushed up on GitHub soon. |
https://github.com/tohagan/connect-phonegap
|
I've forked phonegap-connect and built a new app to do all of this and tuned it for Sencha Touch development. |
Closing this issue. The app can handle multiple devices and 3rd party plugins. Use these instructions for adding plugins. |
Allow devs to perform a 'debug' prepare as part of the Cordova/PG CLI that does the following:
Developer Nirvana: Devs can now update any JS/HTML/CSS/font/image file in root www or merge folders and immediately watch the change on all the devices and OS versions sitting on their desk. I think this would be a Holy Grail that would significantly speed up app development.
I think this would also position Cordova/PG as a significantly faster RAD tool than current native build options (even if you're only coding for one platform) as it entirely skips the Compile/Deploy phase from the development cycle and allows devs to immediately assess the impact of every change on their test devices.
The text was updated successfully, but these errors were encountered: