<!--
{
  "availability" : [
    "iOS: 4.3.0 - 9.0.0",
    "iPadOS: 4.3.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: 9.0.0 - 9.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVError-swift.struct/Code/deviceIsNotAvailableInBackground",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:@E@AVError@AVErrorDeviceIsNotAvailableInBackground"
  },
  "title" : "AVError.Code.deviceIsNotAvailableInBackground"
}
-->

# AVError.Code.deviceIsNotAvailableInBackground

You attempted to start a capture session in the background, which isn’t allowed in iOS.

```
case deviceIsNotAvailableInBackground
```

---

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)