XPC error when using MLMediaLibrary from command line daemon

柔情痞子 提交于 2019-12-03 15:24:16

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

I don't think Konstantin's statement is correct: In order to access MLMediaLibrary your application has to be sandboxed and codesigned.

Per my test, I can use MediaLibrary.framework within my application and my application is not code signed, it doesn't have an entitlements file, so it is abviously not a sandboxed app.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!