<!--
{
  "documentType" : "article",
  "framework" : "MediaLibrary",
  "identifier" : "/documentation/MediaLibrary/load-options-keys",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Load Options Keys"
}
-->

# Load Options Keys

Keys used to specify the `options` dictionary argument to [`init(options:)`](/documentation/MediaLibrary/MLMediaLibrary/init(options:)).

## Topics

### Constants

[`let MLMediaLoadSourceTypesKey: String`](/documentation/MediaLibrary/MLMediaLoadSourceTypesKey)

Defines which sources to load based on library type. If not present, this will load all sources. The value for this key is a media source type. For a list of valid media source types, see [`MLMediaSourceType`](/documentation/MediaLibrary/MLMediaSourceType).

[`let MLMediaLoadIncludeSourcesKey: String`](/documentation/MediaLibrary/MLMediaLoadIncludeSourcesKey)

Defines which media sources to include when loading. If not present, load all available media sources. This option is processed after [`MLMediaLoadSourceTypesKey`](/documentation/MediaLibrary/MLMediaLoadSourceTypesKey). If [`MLMediaLoadIncludeSourcesKey`](/documentation/MediaLibrary/MLMediaLoadIncludeSourcesKey) is present but [`MLMediaLoadSourceTypesKey`](/documentation/MediaLibrary/MLMediaLoadSourceTypesKey) is not, then only those sources specified here will be loaded. This is useful for loading a single media source. When both keys are present, this is useful for adding one or more media sources that normally would not appear for the requested library type. The value for this key is an array of strings (media source identifiers). For a list of valid media source identifiers, see [Media Source Identifiers](/documentation/MediaLibrary/media-source-identifiers).

[`let MLMediaLoadExcludeSourcesKey: String`](/documentation/MediaLibrary/MLMediaLoadExcludeSourcesKey)

Defines which media sources to exclude when loading. This option is processed after [`MLMediaLoadIncludeSourcesKey`](/documentation/MediaLibrary/MLMediaLoadIncludeSourcesKey). The value for this key is an array of strings (media source identifiers). For a list of valid media source identifiers, see [Media Source Identifiers](/documentation/MediaLibrary/media-source-identifiers).

[`let MLMediaLoadFoldersKey: String`](/documentation/MediaLibrary/MLMediaLoadFoldersKey)

Specifies the well-known folders that should be searched for media files. If this key is not present, none of the well-known folders will be provided. The value for this key is an array of strings (identifiers that correspond to well-known folder locations). For a list of well-known folder identifiers, see [Well-Known Folder Identifiers](/documentation/MediaLibrary/well-known-folder-identifiers).

[`let MLMediaLoadAppFoldersKey: String`](/documentation/MediaLibrary/MLMediaLoadAppFoldersKey)

Specifies one or more relative paths inside the caller’s app bundle in which to search for media files. The value for this key is an array of strings (relative paths inside the caller’s app bundle).



---

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)