---
title: container
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckoperation/container
---

# container

The operation’s container.

## Declaration

```swift
var container: CKContainer? { get set }
```

## Discussion

Discussion The container defines where the operation executes. The add(_:) method of the CKContainer and CKDatabase classes implicitly set this property to their container. If you execute the operation yourself, either directly or using a custom operation queue, set the value of this property explicitly. If the value is nil when you execute an operation, the operation implicitly executes in your app’s default container.

## See Also

### Deprecated Properties

- [allowsCellularAccess](cloudkit/ckoperation/allowscellularaccess.md)
- [isLongLived](cloudkit/ckoperation/islonglived.md)
- [timeoutIntervalForRequest](cloudkit/ckoperation/timeoutintervalforrequest.md)
- [timeoutIntervalForResource](cloudkit/ckoperation/timeoutintervalforresource.md)
