---
title: portList
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/httpcookie/portlist
---

# portList

The cookie’s port list.

## Declaration

```swift
var portList: [NSNumber]? { get }
```

## Discussion

Discussion The list of ports for the cookie, returned as an array of NSNumber objects containing integers. If the cookie has no port list, the value of this property is nil and the cookie will be sent to any port. Otherwise, the cookie is only sent to ports specified in the port list.

## See Also

### Getting cookie host properties

- [domain](foundation/httpcookie/domain.md)
- [path](foundation/httpcookie/path.md)
