Run App even user kills the app in IOS

129 Views Asked by At

I want to make an IOS app in which I want to run the app even the user has killed the app from the main thread. For example a Reminder or Alarm Clock app in which even it is not running but still we get the alerts. Can anyone tell me how to achieve this task in iOS.

2

There are 2 best solutions below

0
On

You can't run if you have been killed. That is what it means to be killed. The user is in charge of what is running - not you.

But you can schedule a UILocalNotification so that the system will put up an alarm alert for you.

0
On

You can schedule local notifications (UILocalNotification) to popup in the future. The notifications can be repeating or one-shot.

If the user taps on the notification (or optional custom actions), the app will be restarted. If not, there is no way to keep your app running long term.

I have also read that an app can remain running in the background by playing a repeating silent audio file, but probably not Apple approved.