Creating playlists in iTunes using Scripting Bridge in a Sandboxed app

霸气de小男生 提交于 2019-12-04 17:10:40
Alex

Alright, from what I know (and from what logic tells me) adding entitlements which are not temporary exceptions (com.apple.security.temporary-exception.something) does not hamper the submission of your app. Your app is still accepted, provided that it is clear to the reviewers why you need them. In fact, when submitting an app to iTunes Connect you need to justify every temporary exception ("You must provide information for each temporary exception entitlement specified in your binary."), but I'd justify every entitlement just to be sure there are no misunderstandings.

Now regarding your specific problem: creating playlists. I haven't tried it, but I pretty certain it is possible. This is what you need:

<key>com.apple.security.scripting-targets</key>
<dict>
    <key>com.apple.iTunes</key>
    <array>
        <string>com.apple.iTunes.library.read-write</string>
    </array>
</dict>

If you have read only then you can't create playlists, since that operation is writing info. The playback one is for controlling playback, which is not necessary if all you want to do is create playlists (you might want this one for other stuff, though - depends on your app).

Lastly, I add that I too find myself limping around due to the lack of information concerning Access Groups for scripting. The only resource I have is the PDF for the WWDC 2012: Secure Automation Techniques in OS X talk, in which they have some examples of entitlements for some apps. I really hope this technology is developed further...

EDIT:

I just wanted to say you might want to check this question out for the code, if you haven't written it already.

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