Open macdonst opened 8 years ago
I'm the 'user' :-) That was my finding on Android. I didn't have time to validate on iOS.
@tripodsan I'm pretty sure it will be the same behaviour on iOS. We'll make sure to test.
If you use option type: 'local'
you don't want to update anything. You're requesting an existing version if it exists and optionally copying assets/root app if there weren't any. Not sure what the problem is ?
type: 'local'
to initialise the local copy. creates .../work
.../work
dataDirectory
).../work
Workaround: detect binary update, remove the .../work
directory before calling content sync
expected: even type=local would a at least update the modified files.
@tripodsan Oh I see! I believe this could be fixed by copying root app before doing anything else (checking if app exists etc..). iOS currently checks if app exists before copying root app when type
is set to local
but we could reverse that. I believe Android does the same thing.
Be great to see a fix for this. We have an Android app that can only be updated by publishing an AEM shell update; app store updates have no effect because the updated files aren't being copied to the app's local storage where they are run from.
This appears to have been fixed, so this issue should be Closed.
From a user:
"Another problem we're facing is, that the local content copy does not happen, if the directory already exists. so once the bundled content is copied to the sync directory - that's it. even if you update the original binary, you still have the old content in the synced directory.
So either it should be possible to specify a 'forceReplace' flag, or the local sync should also do a proper merge and update the files that are newer or we need to add some logic to the initial startup to determine if we need to delete the synced directory via the file-plugin."
Basically, you have app version 1 and you do a local sync with copyRootApp/copyCordovaAssets and everything is find. Then you upgrade your app to version 2 and include new app content or a new plugin. The call to do a
local
copy returns immediately and does not copy over the new content to the sync directory location.