---
title: "appendImmediately(_:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassetwriterinput/samplebufferreceiver/appendimmediately(_:)"
---

# appendImmediately(_:)

Appends the sample buffer synchronously if the input is ready for more media data.

## Declaration

```swift
func appendImmediately(_ sampleBuffer: CMReadySampleBuffer<CMSampleBuffer.DynamicContent>) throws -> Bool
```

## Parameters

- `sampleBuffer`: The sample buffer to be appended

## Return Value

Return Value Returns true if the append was successful, false if the input was not ready for more media data.

## Discussion

Discussion note: An error if the underlying writer failed.

## See Also

### Appending samples

- [append(_:)](avfoundation/avassetwriterinput/samplebufferreceiver/append(_:).md)
- [finish()](avfoundation/avassetwriterinput/samplebufferreceiver/finish().md)
