nordnet/cordova-hot-code-push

Sync assets in current version/release (without reloading)

Closed this issue · 8 comments

Problem

in UIWebview i used phonegap-content-sync to download images after app installation. But with WKWebview you can't access them, cause you can't go out of your approot/www. afaik.

So I could just not use WKWebview or find another solution to sync to assets. Or find a way to get your plugin doing this.

But at current state you would have to Reload the App only to show more/newer images witch is bad. So finding a way to download assets/images in the current webversion/release would be really cool.

Yeah, that can be a nice feature. Thanks for the suggestion!

I really needed to get this working. That's why I also tried to make the installUpdate with the option to not refresh. What turned out to be useless, because updated files are still in the wrong folder.

That's why I created my first plugin cordova-plugin-file-sync. which also compares file using a manifest.json but you can specifiy the local directory where it will be downloaded to.

And it defaults to:

file:///Users/pm/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Data/Application/<UDID>/Library/Application Support/cordova-plugin-file-sync/

Then you can use this path in for example a ng-src on an image and as soon as the file is downloaded and a digest whatever runs you will see the image, without reloading anything.

Made using swift 😈

So for me this issue is solved with my plugin, although it would be a lot nicer to just use one plugin.

Nice, good job :) But this will work only for images? Or js/css files as well?

every kind of file =)

But with js/css files, you have to find your own way how to reload/refresh them, since it just downloads them.

Nice, good job :)

Not really :( I can't access the synced assets because wkwebview is blocking it. Okey the plugin may still usable for others using UIWebview. But this is so bad for me :(

Ok no problem anymore if using wkwebview look into at this issue on driftyco's wkwebview. Spinning up a local webserver and serve the data container, gives access to all data from within WKWebview.

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #371 for more information.