---
title: new()
framework: foundation
role: symbol
role_heading: Type Method
path: foundation/urlsessiondownloadtask/new()
---

# new()

Creates and initializes a download task.

## Declaration

```swift
class func new() -> Self
```

## Discussion

Discussion Don’t use this method to manually create download tasks. Instead, use the factory methods on URLSession to add tasks to an existing URL session.

## See Also

### Creating download tasks

- [init()](foundation/urlsessiondownloadtask/init().md)
