Short answer: you cannot. Apple will not allow any application to do such things in the background, as this requires the processor to be turned on when it would otherwise be disabled.
When your application is running, you can read all the events in the near future (say, two weeks?) And set up a βlocalβ push notification for the time of the event.
In addition, if the user launches your application quite often, Apple will be able to update your application using Background Refresh. The device will usually do this in the morning, before any time the user usually wakes up and turns on his phone for the first time every day, as well as during the day also based on user activity. You can do whatever you want while updating the background application.
Another wrench at work is how full disk encryption works. If the phone is locked, there really is little that your application can do. Most of the data on the phone is encrypted with a user password. As long as the user does not enter his access code, little can be done. In this case, the background application update will be launched as soon as they enter their access code, but before launching your application.
Perhaps you may have a remote server to send push notifications to your phone. Not sure if this is an option for you at all or not. Obviously, this means that the server will need access to the user's calendar data.
Abhi beckert
source share