如何“沙箱”我的 Lion 应用程序?
Apple 已颁布法令,从 11 月开始,所有提交到 Mac App Store 的应用程序都必须经过沙盒处理。
好的,但是我如何“沙箱”我的应用程序?
我找到了苹果官方指南 代码签名和应用程序沙盒指南。
本文档列出了以下步骤:
1) “为您的应用程序启用沙箱”。好的,很简单:我必须打开 Xcode 4,选择项目,选择目标,转到“摘要”选项卡并检查:
- “启用权利”
- “启用应用程序沙箱”
- ...以及我感兴趣的每一项权利
。2 ) 然后:“创建基本权利配置文件后,您应该签署您的申请”。简而言之,该指南要求在 .app 上运行命令“codesign”。
但在哪个.app 上呢?
我每次编译都必须这样做吗?
Xcode 不会自动执行此操作吗?
Apple has decreed that all applications submitted to the Mac App Store must be sandboxed, starting in November.
Ok, but how can I "sandbox" my app?
I found the official Apple's guide Code Signing And Application Sandboxing Guide.
This document lists the following steps:
1) "Enable sandboxing for your application." Ok, easy: I have to open Xcode 4, select the project, select the target, go to the Summary tab and check:
- "Enable Entitlements"
- "Enable App Sandboxing"
- ...and every single entitlement I'm interested in.
2) Then: "Once you have created a basic entitlements profile, you should sign your application". In short, the guide says to run the command "codesign" on the .app.
But on which .app?
I have to do this every time I compile?
Xcode does not do that in automatic?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您为应用程序打开沙箱,Xcode 将使用
codesign
工具自动对构建的产品进行签名。如果您想自定义代码签名行为,则只需手动运行
codesign
工具。If you turn on sandboxing for your app, Xcode will automatically sign the built product using the
codesign
tool.You'd only need to run the
codesign
tool manually if you wanted to customise the code signing behaviour.