{"abstract":[{"text":"Deliver notifications that wake your app and update it in the background.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/com.apple.documentation\/documentation\/technologies","doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications","doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/setting-up-a-remote-notification-server"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/pushing-background-updates-to-your-app"},"kind":"article","legalNotices":{"copyright":"Copyright &copy; 2026 Apple Inc. All rights reserved.","privacyPolicy":"https:\/\/www.apple.com\/privacy\/privacy-policy","termsOfUse":"https:\/\/www.apple.com\/legal\/internet-services\/terms\/site.html"},"metadata":{"availableLanguages":["de-DE","en-US","es-419","fr-FR","it-IT","ja-JP","ko-KR","pt-BR","zh-CN"],"modules":[{"name":"User Notifications"}],"role":"article","roleHeading":"Article","title":"Pushing background updates to your App"},"primaryContentSections":[{"content":[{"anchor":"overview","level":2,"text":"Overview","type":"heading"},{"inlineContent":[{"text":"If your app’s server-based content changes infrequently or at irregular intervals, you can use ","type":"text"},{"inlineContent":[{"text":"background notifications","type":"text"}],"type":"emphasis"},{"text":" to notify your app when new content becomes available. A background notification is a remote notification that doesn’t display an alert, play a sound, or badge your app’s icon. It wakes your app in the background and gives it time to initiate downloads from your server and update its content.","type":"text"}],"type":"paragraph"},{"content":[{"inlineContent":[{"text":"","type":"text"},{"text":" ","type":"text"},{"text":"The system treats background notifications as low priority: you can use them to refresh your app’s content, but the system doesn’t guarantee their delivery. In addition, the system may throttle the delivery of background notifications if the total number becomes excessive. The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or three per hour.","type":"text"}],"type":"paragraph"}],"name":"Important","style":"important","type":"aside"},{"anchor":"Enable-the-remote-notifications-capability","level":3,"text":"Enable the remote notifications capability","type":"heading"},{"inlineContent":[{"text":"To receive background notifications, you must add the remote notifications background mode to your app. In the Signing and Capability tab, add the Background Modes capability, then select the Remote notification checkbox. The figure below shows what you must select to recieve background notifications.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"identifier":"media-4285757","type":"image"}],"type":"paragraph"},{"inlineContent":[{"text":"For watchOS, add this capability to your WatchKit Extension.","type":"text"}],"type":"paragraph"},{"anchor":"Create-a-background-notification","level":3,"text":"Create a background notification","type":"heading"},{"inlineContent":[{"text":"To send a background notification, create a remote notification with an ","type":"text"},{"code":"aps","type":"codeVoice"},{"text":" dictionary that includes only the ","type":"text"},{"code":"content-available","type":"codeVoice"},{"text":" key, as shown in the sample code below. You may include custom keys in the payload, but the ","type":"text"},{"code":"aps","type":"codeVoice"},{"text":" dictionary must not contain any keys that would trigger user interactions.","type":"text"}],"type":"paragraph"},{"code":["{","   \"aps\" : {","      \"content-available\" : 1","   },","   \"acme1\" : \"bar\",","   \"acme2\" : 42","}",""],"copyToClipboard":true,"lineAnnotations":[],"showLineNumbers":false,"syntax":"swift","type":"codeListing","wrap":0},{"inlineContent":[{"text":"Additionally, the notification’s POST request should contain the ","type":"text"},{"code":"apns-push-type","type":"codeVoice"},{"text":" header field with a value of ","type":"text"},{"code":"background","type":"codeVoice"},{"text":", and the ","type":"text"},{"code":"apns-priority","type":"codeVoice"},{"text":" field with a value of ","type":"text"},{"code":"5","type":"codeVoice"},{"text":". The APNs server requires the ","type":"text"},{"code":"apns-push-type","type":"codeVoice"},{"text":" field when sending push notifications to Apple Watch, and recommends it for all platforms. For more information, see Create a POST request to APNs in ","type":"text"},{"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/sending-notification-requests-to-apns","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"},{"anchor":"Receive-background-notifications","level":3,"text":"Receive background notifications","type":"heading"},{"inlineContent":[{"text":"When a device receives a background notification, the system may hold and delay the delivery of the notification, which can have the following side effects:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"When the system receives a new background notification, it discards the older notification and only holds the newest one.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"If something force quits or kills the app, the system discards the held notification.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"If the user launches the app, the system immediately delivers the held notification.","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"},{"inlineContent":[{"text":"To deliver a background notification, the system wakes your app in the background. On iOS it then calls your app delegate’s ","type":"text"},{"identifier":"doc:\/\/com.apple.documentation\/documentation\/UIKit\/UIApplicationDelegate\/application(_:didReceiveRemoteNotification:fetchCompletionHandler:)","isActive":true,"type":"reference"},{"text":" method. On watchOS, it calls your extension delegate’s ","type":"text"},{"identifier":"doc:\/\/com.apple.documentation\/documentation\/WatchKit\/WKExtensionDelegate\/didReceiveRemoteNotification(_:fetchCompletionHandler:)","isActive":true,"type":"reference"},{"text":" method. Your app has 30 seconds to perform any tasks and call the provided completion handler. For more information, see ","type":"text"},{"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/handling-notifications-and-notification-related-actions","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}],"kind":"content"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"seeAlsoSections":[{"anchor":"Server-tasks","generated":true,"identifiers":["doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/registering-your-app-with-apns","doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/generating-a-remote-notification","doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/establishing-a-connection-to-apns"],"title":"Server tasks"}],"variants":[{"paths":["\/documentation\/usernotifications\/pushing-background-updates-to-your-app"],"traits":[{"interfaceLanguage":"swift"}]},{"paths":["\/documentation\/usernotifications\/pushing-background-updates-to-your-app"],"traits":[{"interfaceLanguage":"occ"}]}],"references":{"UserNotifications-PageImage-card.png":{"alt":"[A notification interface displayed on the lock screen of an iOS device.]","identifier":"UserNotifications-PageImage-card.png","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.usernotifications\/UserNotifications-PageImage-card@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.usernotifications\/UserNotifications-PageImage-card~dark@2x.png"}]},"doc://com.apple.documentation/documentation/UIKit/UIApplicationDelegate/application(_:didReceiveRemoteNotification:fetchCompletionHandler:)":{"abstract":[{"text":"Tells the app that a remote notification arrived that indicates there is data to be fetched.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"application"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"c:objc(cs)UIApplication","text":"UIApplication"},{"kind":"text","text":", "},{"kind":"externalParam","text":"didReceiveRemoteNotification"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:s11AnyHashableV","text":"AnyHashable"},{"kind":"text","text":" : "},{"kind":"keyword","text":"Any"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"fetchCompletionHandler"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","preciseIdentifier":"c:@E@UIBackgroundFetchResult","text":"UIBackgroundFetchResult"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":")"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/UIKit\/UIApplicationDelegate\/application(_:didReceiveRemoteNotification:fetchCompletionHandler:)","kind":"symbol","role":"symbol","title":"application(_:didReceiveRemoteNotification:fetchCompletionHandler:)","type":"topic","url":"\/documentation\/uikit\/uiapplicationdelegate\/application(_:didreceiveremotenotification:fetchcompletionhandler:)"},"doc://com.apple.documentation/documentation/WatchKit/WKExtensionDelegate/didReceiveRemoteNotification(_:fetchCompletionHandler:)":{"abstract":[{"text":"Tells the delegate that a background notification has arrived.","type":"text"}],"deprecated":true,"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"didReceiveRemoteNotification"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:s11AnyHashableV","text":"AnyHashable"},{"kind":"text","text":" : "},{"kind":"keyword","text":"Any"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"fetchCompletionHandler"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","preciseIdentifier":"c:@E@WKBackgroundFetchResult","text":"WKBackgroundFetchResult"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":")"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/WatchKit\/WKExtensionDelegate\/didReceiveRemoteNotification(_:fetchCompletionHandler:)","kind":"symbol","role":"symbol","title":"didReceiveRemoteNotification(_:fetchCompletionHandler:)","type":"topic","url":"\/documentation\/watchkit\/wkextensiondelegate\/didreceiveremotenotification(_:fetchcompletionhandler:)"},"doc://com.apple.documentation/documentation/technologies":{"abstract":[],"identifier":"doc:\/\/com.apple.documentation\/documentation\/technologies","kind":"technologies","role":"overview","title":"Technologies","type":"topic","url":"\/documentation\/technologies"},"doc://com.apple.usernotifications/documentation/UserNotifications":{"abstract":[{"text":"Push user-facing notifications to the user’s device from a server, or generate them locally from your app.","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications","images":[{"identifier":"UserNotifications-PageImage-card.png","type":"card"}],"kind":"symbol","navigatorTitle":[{"kind":"text","text":"User Notifications"}],"role":"collection","title":"User Notifications","type":"topic","url":"\/documentation\/usernotifications"},"doc://com.apple.usernotifications/documentation/UserNotifications/establishing-a-connection-to-apns":{"abstract":[{"text":"Secure your communications with APNs to send API requests.","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/establishing-a-connection-to-apns","kind":"article","role":"article","title":"Establishing a connection to Apple Push Notification service (APNs)","type":"topic","url":"\/documentation\/usernotifications\/establishing-a-connection-to-apns"},"doc://com.apple.usernotifications/documentation/UserNotifications/generating-a-remote-notification":{"abstract":[{"text":"Send notifications to the user’s device with a JSON payload.","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/generating-a-remote-notification","kind":"article","role":"article","title":"Generating a remote notification","type":"topic","url":"\/documentation\/usernotifications\/generating-a-remote-notification"},"doc://com.apple.usernotifications/documentation/UserNotifications/handling-notifications-and-notification-related-actions":{"abstract":[{"text":"Respond to user interactions with the system’s notification interfaces, including handling your app’s custom actions.","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/handling-notifications-and-notification-related-actions","kind":"article","role":"article","title":"Handling notifications and notification-related actions","type":"topic","url":"\/documentation\/usernotifications\/handling-notifications-and-notification-related-actions"},"doc://com.apple.usernotifications/documentation/UserNotifications/registering-your-app-with-apns":{"abstract":[{"text":"Communicate with Apple Push Notification service (APNs) and receive a unique device token that identifies your app.","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/registering-your-app-with-apns","kind":"article","role":"article","title":"Registering your app with APNs","type":"topic","url":"\/documentation\/usernotifications\/registering-your-app-with-apns"},"doc://com.apple.usernotifications/documentation/UserNotifications/sending-notification-requests-to-apns":{"abstract":[{"text":"Transmit your remote notification payload and device token information to Apple Push Notification service (APNs).","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/sending-notification-requests-to-apns","kind":"article","role":"article","title":"Sending notification requests to APNs","type":"topic","url":"\/documentation\/usernotifications\/sending-notification-requests-to-apns"},"doc://com.apple.usernotifications/documentation/UserNotifications/setting-up-a-remote-notification-server":{"abstract":[{"text":"Generate notifications and push them to user devices.","type":"text"}],"identifier":"doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/setting-up-a-remote-notification-server","kind":"article","role":"collectionGroup","title":"Setting up a remote notification server","type":"topic","url":"\/documentation\/usernotifications\/setting-up-a-remote-notification-server"},"media-4285757":{"alt":"Enabling the remote notification background mode in your project’s Capabilities tab.","identifier":"media-4285757","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/com.apple.usernotifications\/media-4285757@2x.png"},{"traits":["2x","dark"],"url":"\/images\/com.apple.usernotifications\/media-4285757~dark@2x.png"}]}},"variantOverrides":[{"patch":[{"op":"replace","path":"\/identifier\/interfaceLanguage","value":"occ"},{"op":"add","path":"\/topicSections","value":null},{"op":"replace","path":"\/seeAlsoSections","value":[{"anchor":"Server-tasks","generated":true,"identifiers":["doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/registering-your-app-with-apns","doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/generating-a-remote-notification","doc:\/\/com.apple.usernotifications\/documentation\/UserNotifications\/establishing-a-connection-to-apns"],"title":"Server tasks"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1UIKit~1UIApplicationDelegate~1application(_:didReceiveRemoteNotification:fetchCompletionHandler:)\/title","value":"application:didReceiveRemoteNotification:fetchCompletionHandler:"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1UIKit~1UIApplicationDelegate~1application(_:didReceiveRemoteNotification:fetchCompletionHandler:)\/fragments","value":[{"kind":"text","text":"- "},{"kind":"identifier","text":"application:didReceiveRemoteNotification:fetchCompletionHandler:"}]},{"op":"add","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1UIKit~1UIApplicationDelegate~1application(_:didReceiveRemoteNotification:fetchCompletionHandler:)\/navigatorTitle","value":[{"kind":"text","text":"- "},{"kind":"identifier","text":"application:didReceiveRemoteNotification:fetchCompletionHandler:"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1WatchKit~1WKExtensionDelegate~1didReceiveRemoteNotification(_:fetchCompletionHandler:)\/title","value":"didReceiveRemoteNotification:fetchCompletionHandler:"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1WatchKit~1WKExtensionDelegate~1didReceiveRemoteNotification(_:fetchCompletionHandler:)\/fragments","value":[{"kind":"text","text":"- "},{"kind":"identifier","text":"didReceiveRemoteNotification:fetchCompletionHandler:"}]},{"op":"add","path":"\/references\/doc:~1~1com.apple.documentation~1documentation~1WatchKit~1WKExtensionDelegate~1didReceiveRemoteNotification(_:fetchCompletionHandler:)\/navigatorTitle","value":[{"kind":"text","text":"- "},{"kind":"identifier","text":"didReceiveRemoteNotification:fetchCompletionHandler:"}]}],"traits":[{"interfaceLanguage":"occ"}]}]}