Error Loading Media Sources in Mlmedialibrary

Error loading media sources in MLMediaLibrary

Turns out there were two things amiss:

1. The MLMediaLoadIncludeSourcesKey should point to an array of strings, not a single string

2. The observation key path was wrong, should be "mediaSources", was missing an s

XPC error when using MLMediaLibrary from command line daemon

In order to access MLMediaLibrary your application has to be sandboxed and codesigned.

Update

It seems like you also have to add some permanent read-only access entitlements to your .entitlements file.

If you want to access Photos, iPhoto or Aperture libraries:

<key>com.apple.security.assets.pictures.read-only</key>
<true/>

If you want to access iMovie and FinalCut:

<key>com.apple.security.assets.movies.read-only</key>
<true/>

If you want to access iTunes or Logic:

<key>com.apple.security.assets.music.read-only</key>
<true/>

You can read about my poor experience with a MediaLibrary framework here:
https://devforums.apple.com/message/1125821



Related Topics



Leave a reply



Submit