Waking up an iOS app after app is terminated from App Switcher

Hi All,

My requirements is to run some code on daily basis for every user of our app, irrespective of whether the user open the app or not.

I achieve this using 1) Background Processing/Fetch and 2) Silent Push Notification.

Both are working fine so far. But for some users, who are terminating our app from App Switcher, it is somehow not working.

How can i make my code running for those users also on daily basis, even after they terminate our app from App Switcher?

Please give me your thoughts. Thank you.

Answered by DTS Engineer in 727349022

But for some users, who are terminating our app from App Switcher, it is somehow not working.

That’s expected. iOS interprets that as an indication from the user that they don’t want your app running, and it’ll prevent it from being launched in the background again until the user manually launches it from the Home screen. There’s no way for you, as the app developer, to override the user’s decision here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

But for some users, who are terminating our app from App Switcher, it is somehow not working.

That’s expected. iOS interprets that as an indication from the user that they don’t want your app running, and it’ll prevent it from being launched in the background again until the user manually launches it from the Home screen. There’s no way for you, as the app developer, to override the user’s decision here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@eskimo, Ok, Thank you for the reply.

But all the users who are terminating our app does not know that they are going to miss some daily benefit, which we will be creating by running our code on Background Processing/Fetch and Silent Push Notification.

Mine is an offline application having many local calculations based on user input.

User can enable one hour alert, which will display location notification every one hour at specific time based on user input but NOT at regular interval, which will vary user by user.

Based on some local calculations using user input, i will send local notification for the user every one hour.

One day one user will get location notification at 1:30am, 2:10am, 3: 15am, etc

Next day, they may get local notification at 1:10am, 2:15:am, etc

It will be based on current date and user input. We cannot predict.

For the active users, whenever they open our app, we will do the calculation and send location notification every one hour.

But some users will not open our app at all, but they have subscribed for one hour alert.

Those not-active users, may have quit app from App Switcher, also while user quit the app, they does not know that they are going to break their one hour alert, which i will trigger in the Background Processing/Fetch and Silent Push Notification.

We do not have user details on server, so we cannot keep any calculation at server and send push notification.

Can you please advise me that how to handle this scenario?

Thank you.

But all the users who are terminating our app does not know that they are going to miss some daily benefit

Your only option here is to educate your users about the consequences of their actions.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Dear Eskimo,

I know this is an old thread, but we are also in desperate need of not loosing the BLE background wake-up once the user force-quits the app. This is for a life-saving, medical device app, that already has the critical alert entitlement granted.

The current patient EXD (not the app) is supposed to wake-up and start BLE advertising, at which point the app will auto-reconnect (once initially connected) if nearby and receive the alert, and then display the critical alert on the iOS device. However, once the user does the normal thing of closing the app, then the whole point of this app goes away. I know you say that education is the key, and that we have to educate the users to NEVER close the app, but that seems unreasonable, especially given some of the older population demographic of these types of medical device apps.

If iOS, closes the app, then it still wakes it up for BLE connections, but not if the user closes it, so I know it's possible to still wakeup the app even if fully closed. To be honest, I don't understand why "Background services enabled" hasn't been made it's own toggle inside every app's settings, like location services, etc., etc. That way the user could decide on an app-by-app basis, to still allow an app to have it's background processing enabled, or not. And when they swipe it away, it just means it's closed it doesn't mean it's basically disabled.

Simply closing the app, is a normal part of being a smart-phone user, and no where does it tell the user, you're also going to basically disable this app when you swipe it away, so it seems like a major design flaw, and one Apple should address, not put back on us like "you need to educate your users". I've been an iOS developer since 2010, and I can tell you, that doesn't work. This background thing has been a thorn in my side since I became a mobile developer. Android makes it so much easier, though they are starting to make it more and more difficult too. I understand the need for limiting background usages, but there needs to be some special cases or something for apps that have the critical alert entitlement at least, otherwise what's the point? How are we supposed to trigger a critical alert if we can do anything in the background?

That said, what if anything can we do in our scenario, or should I just inform the medical device companies that we work with that iOS is not a viable platform for any kind of large scale smartphone app deployment, that need to be an EXD (external alarming device) for BLE enabled medical devices.

Best regards, Mike H. Software Engineer / Velentium LLC

Waking up an iOS app after app is terminated from App Switcher
 
 
Q