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
cordova --version # 8.0.0
cordova platform version ios # 4.5.4
Plugin version
cordova plugin version | grep phonegap-plugin-contentsync # 1.4.2
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.