Adding the plugin cordova-plugin-service-worker gave me this issue
I ran this on an iOS 9.2 simulator, registered a periodic sync event, and it kept firing every 2 seconds. On disconnecting and reconnecting the events start firing again.
Doing the same on an iOS 10.2 simulator, the event is not fired again. I tracked this down to the kReachabilityChangedNotificationnot being fired on reconnect, and could be related to this issue
However, the event (periodic sync) is not fired on a 10.3.2 device either, and I haven't been able to debug it yet. Has anyone got this to work on iOS 10?
I set up the sample app using cordova 5.41 by running the following commands and ran it on an iPad running iOS 10.3.2:
cordova create BackgroundSyncDemo io.cordova.backgroundsyncdemo BackgroundSyncDemo cd BackgroundSyncDemo cordova platform add ios@3.9.2 cordova plugin add https://github.com/MobileChromeApps/cordova-plugin-service-worker cordova plugin add cordova-plugin-service-worker-background-sync mv 'plugins/cordova-plugin-service-worker-background-sync/sample/config.xml' 'config.xml' mv 'plugins/cordova-plugin-service-worker-background-sync/sample/www/sw.js' 'www/sw.js' mv 'plugins/cordova-plugin-service-worker-background-sync/sample/www/index.html' 'www/index.html' mv 'plugins/cordova-plugin-service-worker-background-sync/sample/www/js/index.js' 'www/js/index.js' mv 'plugins/cordova-plugin-service-worker-background-sync/sample/www/css/index.css' 'www/css/index.css' cordova prepare
Adding ios platform > 4.0 gave me this issue
Adding the plugin cordova-plugin-service-worker gave me this issue
I ran this on an iOS 9.2 simulator, registered a periodic sync event, and it kept firing every 2 seconds. On disconnecting and reconnecting the events start firing again.
Doing the same on an iOS 10.2 simulator, the event is not fired again. I tracked this down to the
kReachabilityChangedNotification
not being fired on reconnect, and could be related to this issueHowever, the event (periodic sync) is not fired on a 10.3.2 device either, and I haven't been able to debug it yet. Has anyone got this to work on iOS 10?