Scenario: Backend returns a list of appointments with timings and their priorities for the current day (24 hours). iOS application checks for the most important (top priority) meeting and schedule local notification for that particular appointment time.
Requirement: Ideally app should notify user about the most important appointment of the day. So App should fetch the data at-least once in 24 hours (As backend data gets updated for each day) to schedule local notifications for each day.
Problem: To trigger background downloading (Other than background-fetch) reliably and periodically (once in 24 hours) and and execute small code (to schedule local notifications) even after user force quits the application.
I have implemented background fetch to download the data if app is in suspended or in background mode, although it is not reliable. The main problem occurs when user force quit the application from multitasking window (by swiping-up), iOS does not trigger background fetch most of the time (As per the apple documentation, and it is happening in my case as well).
App downloads the data and works fine if user opens it at-least once a day.
I read that silent remote notification
can trigger the code by using notification-service-extention,
but that need backend to trigger the notification. Is there any way if I can schedule silent local notifications
to trigger run code in notification-service-extention