We are developing an application where it requires a feature to run the application in background get the latest updates as well but during the development process , we identified the background sync lasted only for 30 seconds. Kindly help in troubleshooting the issue
IOS Development - Background sync issues
Not sure how you are trying to implement running your app in the background, but for most methods, a 30 second time limit is expected.
I suggest to read iOS Background Execution Limits to understand what you can and cannot do in the background.
If your feature indeed needs to run in the background and has to take longer, then I can suggest using BGProcessingTaskRequest via the Background Tasks Framework
This API will give your app an extended background execution time, typically delivered overnight when the user is asleep.
Argun Tekant / DTS Engineer / Core Technologies
I am developing an application usinh native apps, where the app needs to continuously sync data (such as daily tasks and orders) even when offline or running in the background. However, on iOS, the background sync stops after 30 seconds, limiting the functionality. The Background Sync API and Service Workers seem restricted on iOS, causing syncing to fail when the app is in the background or offline. What is the best way to ensure continuous background synchronization on iOS? Additionally, what is the most efficient data storage approach for managing offline capabilities and syncing smoothly when the network is unstable and for the background sync?
You cannot continuously sync in the background. Nor it is always necessary to continuously sync non-stop when the app is not running. What good is updated data to the app if it is not running or being used? You can always sync when the user launches the app.
I would suggest to look at iCloud Services. You can use them to set your app's iCloud container to sync with your app as necessary. It may not be "continuous", but iCloud will use techniques to sync your data in a balanced approach that optimizes system resources.
Argun Tekant / DTS Engineer / Core Technologies