---
title: resume()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/urlsessiontask/resume()
---

# resume()

Resumes the task, if it is suspended.

## Declaration

```swift
func resume()
```

## Mentioned in

Downloading files from websites Uploading streams of data Downloading files in the background Fetching website data into memory Pausing and resuming downloads Pausing and resuming uploads Uploading data to a website

## Discussion

Discussion Newly-initialized tasks begin in a suspended state, so you need to call this method to start the task.

## See Also

### Controlling the task state

- [cancel()](foundation/urlsessiontask/cancel().md)
- [suspend()](foundation/urlsessiontask/suspend().md)
- [state](foundation/urlsessiontask/state-swift.property.md)
- [URLSessionTask.State](foundation/urlsessiontask/state-swift.enum.md)
- [priority](foundation/urlsessiontask/priority.md)
- [URL session task priority](foundation/url-session-task-priority.md)
