<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.9.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "MediaLibrary",
  "identifier" : "/documentation/MediaLibrary/MLMediaLibrary/mediaSources",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Media Library"
    ],
    "preciseIdentifier" : "c:objc(cs)MLMediaLibrary(py)mediaSources"
  },
  "title" : "mediaSources"
}
-->

# mediaSources

Returns a dictionary of media sources by identifier.

```
var mediaSources: [String : MLMediaSource]? { get }
```

## Discussion

Returns `nil` the first time, beginning an asynchronous load of the media sources. A KVO notification is sent when all media sources have been loaded. If there are no objects in a media source, the source does not appear in this dictionary.

---

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)