Giter Club home page Giter Club logo

Comments (7)

nikDemyankov avatar nikDemyankov commented on June 30, 2024

Yes, when you deploy your application for the first time - plugin takes data from the bundle/assets folder and copies it on the external storage. The reason for that is that you can't modify files in the bundle/assets. After that - it load's www files from the external storage. If later you add some files to the www folder and redeploy the app - it is not gonna detect those changes, because plugin configured to update web files via server.

Plugin will reinstall www folder from the bundle/assets if it detects, that application was updated through the store (probably need to add that info in the readme...). It does that by checking if code version of the app has increased. And the code version is:

  • for Android it is a versionCode preference in AndroidManifest.xml.
  • for iOS it is a Build number (not the version number, that is visible to the user on the store).

In config-xml you can set them like so:

<widget id="com.example.application"
      android-versionCode="7"
      ios-CFBundleVersion="7">

Why it doesn't compare and reinstall files on each launch/deploy? Because it takes time and usually it is not needed. For development purpose you either use local development mode, or increase build version, or delete app. For after-release - user update app through the store and this is handled fine by the plugin.

from cordova-hot-code-push.

ptarjan avatar ptarjan commented on June 30, 2024

I don't like any of those 3 suggestions and will be a non-starter for me using your plugin :( If the local-development is true in the config.xml can you bypass this speed check and always load from the bundle?

from cordova-hot-code-push.

nikDemyankov avatar nikDemyankov commented on June 30, 2024

This is doable. But you can just use cordova-hcp server for local development, and all your new web files will be installed after application launch via normal update workflow.

from cordova-hot-code-push.

ptarjan avatar ptarjan commented on June 30, 2024

Right, but not for new plugin additions or config.xml changes. People forget to bump the version and expect the app to update.

from cordova-hot-code-push.

nikDemyankov avatar nikDemyankov commented on June 30, 2024

Yes, if you add new plugin during the development - you need a clean install. Ok, I'll add it in the next release. Thanks for the feedback.

from cordova-hot-code-push.

nikDemyankov avatar nikDemyankov commented on June 30, 2024

For local development you should now use a separate plugin. On each build it will increase build version of the application, that will force the main plugin to reinstall www folder on the external storage.

from cordova-hot-code-push.

nikDemyankov avatar nikDemyankov commented on June 30, 2024

Closing the issue since this now relates to the Local Development Add-on. You should use it for development purpose and to reinstall the www folder. Or there are other ways to do it, as described in the documentation.

from cordova-hot-code-push.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.