Why this happens
There are three states your app can be in when a push arrives, and iOS treats them very differently:
- Suspended or in the background — silent pushes and background fetch work normally.
- Terminated by the system (memory pressure, reboot, app update) — the system can still launch your app in the background for a
content-availablepush. - Force-quit by the user (swiped up in the app switcher) — the system will not launch your app for anything.
The third case is the one that surprises people. Swiping your app away is an explicit stop request, and iOS honours it. From that moment background launches are disabled for your app: no silent push, no BGAppRefreshTask, no background URLSession handoff. That stays true until the user opens the app again or the device restarts.
The WWDC 2013 multitasking session demonstrated “launched into background” without covering this exception, so plenty of implementations were written expecting a wake-up that never arrives. Apple later made the rule explicit in the documentation for application(_:didReceiveRemoteNotification:fetchCompletionHandler:): the system wakes the app from the suspended state, but does not launch it automatically if the user force-quit it.
It is also worth remembering that a silent push is best-effort even in the good case. APNs throttles background pushes, and delivery is never guaranteed.
How to fix it
There is no API that re-enables background launches after a force-quit. The fix is architectural: stop depending on a wake-up that cannot happen, and make the visible path reliable.
1. Confirm it is really the force-quit and not a broken payload
Before changing the design, rule out the ordinary mistakes. A background push needs all of the following:
content-availableinside theapsdictionary, as the integer1- the Remote notifications background mode enabled in the target’s Signing & Capabilities tab
- the
apns-push-type: backgroundheader - the
apns-priority: 5header (a background push sent with priority 10 is rejected) - a valid
apns-topicmatching the app’s bundle ID
{
"aps": {
"content-available": 1
},
"sync": "inbox"
}
On the app side, keep the handler short and always call the completion handler exactly once:
import UIKit
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable: Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
Task {
do {
try await SyncEngine.shared.pull()
completionHandler(.newData)
} catch {
completionHandler(.failed)
}
}
}
If the handler fires while the app is in the background but never fires after a swipe, the payload is fine and you are looking at the force-quit rule.
2. Debug the background launch with the scheme setting
Attaching a debugger to a process that does not exist yet is awkward. In Xcode, edit the scheme, open the Run action, and set Launch to Wait for the executable to be launched. Then send the push. Xcode attaches when the system starts your app in the background, and your breakpoint in didReceiveRemoteNotification hits.
This is a debugging aid only. It will not make the app launch after a force-quit — nothing will.
3. Use an alert notification for anything the user must receive
Alert pushes are delivered by the system, not by your app, so they arrive whether the app is running, suspended, or force-quit. Tapping the banner launches the app and hands you the payload through userNotificationCenter(_:didReceive:withCompletionHandler:).
{
"aps": {
"alert": { "title": "New message", "body": "Tap to open" },
"sound": "default",
"mutable-content": 1
}
}
With mutable-content: 1 you can add a Notification Service Extension to decrypt or enrich the content before it is shown. The extension is a separate process launched by the system, so it runs even when the host app was force-quit. Keep the work inside it short — the system gives it a limited window before calling serviceExtensionTimeWillExpire().
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
override func didReceive(_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
guard let content = request.content.mutableCopy() as? UNMutableNotificationContent else {
contentHandler(request.content)
return
}
content.subtitle = "Synced just now"
contentHandler(content)
}
}
4. Move periodic work to BGTaskScheduler and accept the same limit
BGAppRefreshTask is the modern replacement for setMinimumBackgroundFetchInterval(_:), and it obeys the identical rule: it will not run after a force-quit until the user opens the app again. Register the identifier in BGTaskSchedulerPermittedIdentifiers in Info.plist and schedule it early in the launch cycle.
import BackgroundTasks
BGTaskScheduler.shared.register(forTaskWithIdentifier: "com.example.app.refresh",
using: nil) { task in
guard let refresh = task as? BGAppRefreshTask else { return }
let work = Task { try await SyncEngine.shared.pull() }
refresh.expirationHandler = { work.cancel() }
Task {
let success = (try? await work.value) != nil
refresh.setTaskCompleted(success: success)
}
}
Because the schedule is opportunistic, treat it as a top-up, not a source of truth.
5. Do not reach for PushKit as a workaround
VoIP pushes delivered through PushKit can wake an app in situations where a standard silent push cannot, but they are reserved for VoIP apps. Since iOS 13 the app must report an incoming call through CallKit immediately after receiving one, or the system terminates it and stops delivering VoIP pushes altogether. Using PushKit for general background sync is a well-known route to App Review rejection.
How to prevent it
- Design the server as the source of truth and have the app reconcile on every launch, so a missed background wake-up costs nothing.
- Use alert notifications for anything time-sensitive or user-visible; reserve
content-availablefor opportunistic refreshes. - Test the force-quit path deliberately: swipe the app away, send a push, confirm nothing happens, then relaunch and confirm sync catches up.
- Log
UIApplication.shared.applicationStateat launch so you can tell a background wake-up from a foreground start in your own diagnostics. - Never assume a silent push was delivered. There is no delivery receipt for background pushes.
FAQ
Does iOS launch my app in the background after the user swipes it away?
No. A force-quit from the app switcher disables background launches for your app — silent push, background fetch and BGTaskScheduler all stop firing. The behaviour resets once the user opens the app again or the device restarts.
Is there a way to detect that the user force-quit the app?
There is no public API that reports a force-quit. You can only infer it indirectly, for example by noticing that background launches stopped while the app was never opened, or by comparing timestamps on your server against the last launch you recorded.
What is the difference between an app killed by the system and one killed by the user?
An app terminated by the system — for memory pressure, an update, or a reboot — is still eligible to be relaunched in the background for a content-available push. An app the user swiped away is not, and that distinction is the whole reason a silent push can work in testing and fail in the field.
Parts of this guide are adapted from content licensed under CC BY-SA 3.0; this article is shared under the same license.
