<!--
{
  "availability" : [
    "iOS: 4.1.0 - 27.0.0",
    "iPadOS: 4.1.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.7.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetWriter/startWriting()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetWriter(im)startWriting"
  },
  "title" : "startWriting()"
}
-->

# startWriting()

Tells the writer to start writing its output.

```
func startWriting() -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if writing starts successfully; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

You must call this method after you configure the writer and add its inputs to prepare the object to write data. After you call this method, your app can start writing sessions by calling [`startSession(atSourceTime:)`](/documentation/AVFoundation/AVAssetWriter/startSession(atSourceTime:)) and can write media samples using the methods that the asset writer’s inputs provide.

If writing fails to start, this method returns <doc://com.apple.documentation/documentation/Swift/false>. In this case, check the values of the [`status`](/documentation/AVFoundation/AVAssetWriter/status-swift.property) and [`error`](/documentation/AVFoundation/AVAssetWriter/error) properties to determine the reason for the failure.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)