Comments (2)
Hi @rajatrocks ,
It's very easy: The Remote Server is your Single Source of Truth.
Also: App-Loader tries to be efficient and minimize downloads. Using the version
in Manifest.json
, App-Loader compares the files:
- Only changed files are downloaded.
- Try to copy file from bundle first.
How you handle your check -> update -> download
logic is up to you.
Let's examine your situation step by step:
- You download the App. (version 1)
- You do a remote update (version 2)
- Your app does a
check -> update -> download
. - Your app is version 2.
- You publish a new version to the App Store (version 3) and to your remote server.
- Before your App can check the remote server, the App is updated from the App Store.
- Your app still runs version 2 (from the cache) - but it has version 3 files bundled.
- Your app does a
check -> update -> download
. It detects remote version 3. Instead of downloading the files from Remote, it can copy the files from the Bundle. - Your App is now version 3.
What happens if at step 6, your App first checks remote server before downloading App Store update?
- Your app does a
check -> update -> download
- files cannot be copied, so they are downloaded. - Your app is version 3.
- Your app is updated from App Store (version 3). This does not change anything - your app was already running version 3 from the cache.
And for fun: What happens if you push a corrupt update?
- You do a remote update (version 4).
- The app does a
check -> update -> download
. - The update is corrupt, BOOTSTRAP_OK is not fired b/c of a syntax error. App reverts back to bundled version (3).
- App is now version 3 (running form the bundle instead of cache).
- The app does a
check
-- it detects you downloaded this earlier, so it will not update. - You do a remote update (version 5) with a bugfix (no more corrupt).
- The app wil update again.
Thanks to the App Store update, the App will fall back on version 3 instead of version 1!
from cordova-app-loader.
Great explanation, thank you @markmarijnissen !
from cordova-app-loader.
Related Issues (20)
- Auto-reset when updating apk HOT 2
- Is it possible to custom remote file url
- problem and suggest HOT 1
- How to deal with fonts
- Calling download() never finishes. HOT 3
- onSingleDownloadProgress is not a function HOT 3
- Error: Not allowed to load local resource
- Remote Updating HTML files? HOT 2
- file is long time cached by server,the file do not affected!
- Getting FileError
- stuck when starting the app
- Multiple servers: one server per each AppStore app version
- Updates not working in combination with cordova-plugin-crypt-file HOT 1
- Still having issues with Phonegap Developer app
- Question: Does this way of auto-updating go against the guidelines of Apple? HOT 3
- Error code 1 when cloning demo - no exception message
- Cordova plugin HOT 1
- download promise is neither getting resolved nor rejected HOT 1
- app.js file inside www is not updated with latest code HOT 4
- This plugin not working in android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-app-loader.