<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureSession/runDeferredStartWhenNeeded()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureSession(im)runDeferredStartWhenNeeded"
  },
  "title" : "runDeferredStartWhenNeeded()"
}
-->

# runDeferredStartWhenNeeded()

Tells the session to run deferred start when appropriate.

```
func runDeferredStartWhenNeeded()
```

## Discussion

For best perceived startup performance, call this after displaying the first frame, so that deferred start processing doesn’t interfere with other initialization operations. For example, if using a <doc://com.apple.documentation/documentation/QuartzCore/CAMetalLayer> to draw camera frames, add a `presentHandler` (using <doc://com.apple.documentation/metal/mtldrawable/addpresentedhandler>) to the first drawable and call [`runDeferredStartWhenNeeded()`](/documentation/AVFoundation/AVCaptureSession/runDeferredStartWhenNeeded()) from there.

If one or more outputs need to start to perform a capture operation, and [`runDeferredStartWhenNeeded()`](/documentation/AVFoundation/AVCaptureSession/runDeferredStartWhenNeeded()) has not run yet, the session runs the deferred start on your app’s behalf. Only call this method once for each configuration commit - after the first call, subsequent calls to [`runDeferredStartWhenNeeded()`](/documentation/AVFoundation/AVCaptureSession/runDeferredStartWhenNeeded()) have no effect. The deferred start runs asynchronously, so this method returns immediately.

> Note: You can only call this when ``doc://com.apple.avfoundation/documentation/AVFoundation/AVCaptureSession/automaticallyRunsDeferredStart`` is `false`. Otherwise, the session throws an `NSInvalidArgumentException`.

> Important: To avoid blocking your app’s UI, don’t call this method from the application’s main actor or queue.

---

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)