---
title: "close(updatingContext:)"
framework: applearchive
role: symbol
role_heading: Instance Method
path: "applearchive/archivebytestream/close(updatingcontext:)"
---

# close(updatingContext:)

Closes the stream, releases associated resources, and writes the sealed container attributes to the specified encryption context.

## Declaration

```swift
func close(updatingContext context: ArchiveEncryptionContext) throws
```

## Parameters

- `context`: The encryption context that receives the sealed container attributes.
