---
title: "customStream(instance:)"
framework: applearchive
role: symbol
role_heading: Type Method
path: "applearchive/archivestream/customstream(instance:)"
---

# customStream(instance:)

Returns a new archive stream instance mapped to an object that conforms to the archive stream protocol.

## Declaration

```swift
static func customStream<C>(instance: C) -> ArchiveStream? where C : AnyObject, C : ArchiveStreamProtocol
```

## Parameters

- `instance`: The object that the new archive stream wraps.

## Return Value

Return Value A new archive stream.

## See Also

### Using Custom Streams

- [withStream(wrapping:_:)](applearchive/archivestream/withstream(wrapping:_:).md)
