在沙盒应用程序中使用脚本桥在iTunes中创建播放列表 [英] Creating playlists in iTunes using Scripting Bridge in a Sandboxed app

查看:87
本文介绍了在沙盒应用程序中使用脚本桥在iTunes中创建播放列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能吗?

在此问题中,我看到您已添加到权利文件中:

In this question I saw that you add to the entitlements file:

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

用于读取访问.但是,您如何获得写访问权限?我查看了文档,并向他们推荐了sdef的手册,但我无法从中提取任何信息.

for read access. But how do you get write access? I looked in the documentation and they suggest the manual for sdef, but I couldn't extract any information from this.

此外,这会妨碍提交到App Store的提交吗?

Also, would this hamper a submission to the App Store?

推荐答案

好吧,根据我所知道的(以及根据逻辑告诉我的),添加了不是临时例外的权利(com.apple.security.temporary-exception. something )不会妨碍您提交应用.您的应用仍会被接受,只要审核者清楚您为什么需要它们.实际上,在将应用程序提交到iTunes Connect时,您需要证明每个临时异常的合理性(您必须提供二进制文件中指定的每个临时异常权利的信息."),但我会为每个权利合理化,以确保不存在任何临时异常.误会.

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>

如果您只有 read 则不能创建播放列表,因为该操作是 write info. playback 用于控制播放,如果您要做的只是创建播放列表(您可能希望将其用于其他内容,这取决于您的应用)就没有必要了.

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).

最后,我补充说,由于缺乏有关脚本访问组的信息,我也发现自己四处走动.我唯一拥有的资源是WWDC 2012: Secure Automation Techniques in OS X演讲的PDF,其中有 some 个应用程序的权利示例.我真的希望这项技术得到进一步发展...

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...

我只是想说您可能要检查询问代码,如果您还没有编写的话.

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

这篇关于在沙盒应用程序中使用脚本桥在iTunes中创建播放列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆