<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/BackgroundTask/appRefresh(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI14BackgroundTaskV10appRefreshyACyytytGSSFZ"
  },
  "title" : "appRefresh(_:)"
}
-->

# appRefresh(_:)

A task that updates your app’s state in the background for a
matching identifier.

```
static func appRefresh(_ identifier: String) -> BackgroundTask<Void, Void>
```

## Parameters

`identifier`

The identifier to match.

## Return Value

A background task that you can handle with your app or
extension.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)