<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImagePickerController/isSourceTypeAvailable(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImagePickerController(cm)isSourceTypeAvailable:"
  },
  "title" : "isSourceTypeAvailable(_:)"
}
-->

# isSourceTypeAvailable(_:)

Queries whether the device supports picking media using the specified source type.

```
class func isSourceTypeAvailable(_ sourceType: UIImagePickerController.SourceType) -> Bool
```

## Parameters

`sourceType`

The source to use to pick an image or movie.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the device supports the specified source type; <doc://com.apple.documentation/documentation/Swift/false> if the specified source type is not available.

## Discussion

Because a media source may not be present or may be unavailable, devices may not always support all source types. For example, if you attempt to pick an image from the user’s library and the library is empty, this method returns <doc://com.apple.documentation/documentation/Swift/false>. Similarly, if the camera is already in use, this method returns <doc://com.apple.documentation/documentation/Swift/false>.

Before attempting to use an `UIImagePickerController` object to pick an image, you must call this method to ensure that the desired source type is available.

---

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)