Is there a way to run cksyncengine when app is in background?

My app is able to receive data updates when it is in foreground.

however, when i move it in background then sync engine stops syncing until I again move app to foreground.

Answered by DTS Engineer in 810749022

When you use CKSyncEngine, the system determines when to synchronize data, and there is no API for you to impact the synchronization pace. This is to balance the use of system resources and achieve the best overall user experience on the devices.

In your case, it is most likely just that CKSyncEngine chooses to not synchronize data when your app runs in the background. When your app isn't launched or is suspended, CKSyncEngine doesn't run either, because it is a part of your app process.

Having said that, if your see that the way CKSyncEngine works doesn't fit your use case, I’d suggest that you file a feedback report for the CloudKit team to evaluate – If you do so, please share your report ID here.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

When you use CKSyncEngine, the system determines when to synchronize data, and there is no API for you to impact the synchronization pace. This is to balance the use of system resources and achieve the best overall user experience on the devices.

In your case, it is most likely just that CKSyncEngine chooses to not synchronize data when your app runs in the background. When your app isn't launched or is suspended, CKSyncEngine doesn't run either, because it is a part of your app process.

Having said that, if your see that the way CKSyncEngine works doesn't fit your use case, I’d suggest that you file a feedback report for the CloudKit team to evaluate – If you do so, please share your report ID here.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Is there a way to run cksyncengine when app is in background?
 
 
Q