<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/userPreferredCamera",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDevice(cpy)userPreferredCamera"
  },
  "title" : "userPreferredCamera"
}
-->

# userPreferredCamera

A camera the user prefers to use for video and photo capture.

```
class var userPreferredCamera: AVCaptureDevice? { get set }
```

## Discussion

In addition to being a [`systemPreferredCamera`](/documentation/AVFoundation/AVCaptureDevice/systemPreferredCamera), you can designate a device as a user-preferred camera. Setting a value for this property allows an app to persist its preference across app launches and system reboots. The system internally maintains a short history of devices, so if a user’s most recently preferred camera isn’t currently connected, it still reports the next best choice.

This property always returns a device that’s present. If no camera is available, this value is `nil`.

> Note:
> Setting the value to `nil` has no effect.

---

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)