You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
When using sync = ContentSync.sync({id: "...", type: "local", src: ""); sync.on("error", function() {...}); on Android, the error handler gets called when there is no synced content yet.
(I believe I read somewhere in the docs that this is the suggested method to test if there is synced content already available, but I didn't find this anymore. Is this still correct usage?)
Actual Behaviour
On iOS, the same code hangs, as no handler is called at all. I would expect that also the error handler is called in this case.
Reproduce Scenario (including but not limited to)
see above
Steps to Reproduce
see above, in my case this behaviour can be reproduced every time
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 9.3.5
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
iPod touch
Cordova CLI version and cordova platform version
cordova --version # 8.0.0
cordova platform version ios # 4.5.4
Plugin version
cordova plugin version | grep phonegap-plugin-contentsync # 1.4.2
Does someone know if it is a supported usage of the plugin to use this with undefined src to test if there is data already available (downloaded during a previous app start)?
The type local returns the full path to the cached content if it exists or downloads it from options.src if it doesn't. options.src is not required if cached content actually exists.
So, I think this should work and the handler should be called.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behaviour
When using
sync = ContentSync.sync({id: "...", type: "local", src: ""); sync.on("error", function() {...});
on Android, the error handler gets called when there is no synced content yet.(I believe I read somewhere in the docs that this is the suggested method to test if there is synced content already available, but I didn't find this anymore. Is this still correct usage?)
Actual Behaviour
On iOS, the same code hangs, as no handler is called at all. I would expect that also the error handler is called in this case.
Reproduce Scenario (including but not limited to)
see above
Steps to Reproduce
see above, in my case this behaviour can be reproduced every time
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 9.3.5
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
iPod touch
Cordova CLI version and cordova platform version
Plugin version
Sample Code that illustrates the problem
sync = ContentSync.sync({id: "...", type: "local", src: "");
sync.on("complete", function() { console.log("complete") });
sync.on("error", function() { console.log("error") });
Logs taken while reproducing problem
The last thing I see in the logs is the message "Requesting local copy of ".
Actually I stepped through the
sync:
method in ContentSync.m but I didn't figure out at which point the callbacks should be called.There is a "Sync...." callback registered in the JS part, however (if you inspect
cordova.callbacks
.The text was updated successfully, but these errors were encountered: