如何在没有XCode的情况下构建沙盒应用程序? [英] How to build Sandboxed app without XCode?
问题描述
如何在没有XCode的情况下构建沙盒应用程序?我的意思是我使用gcc Make来构建我的应用程序和自己的系统来创建应用程序包。但是,如何在不使用XCode的情况下启用Sandbox并选择它的Sandbox选项?
How to build Sandboxed app without XCode? I mean I'm using gcc Make to build my applications and own system for creating app bundles. But how can I enable the Sandbox without using XCode and option it's Sandbox option?
有关Sandbox的信息,但我找不到有关启用Sandbox的任何信息,但仍然没有关于没有XCode的SB ..任何人都可以提供帮助吗?
http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxQuickStart/AppSandboxQuickStart.html#//apple_ref/doc/uid/TP40011183-CH2
There's tut about Sandbox, but I can't find anywhere informations about enabling Sandbox, but still no about SB without XCode.. Anyone can help? http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxQuickStart/AppSandboxQuickStart.html#//apple_ref/doc/uid/TP40011183-CH2
推荐答案
<?xml version="1.0" encoding="utf-8"?>
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
一旦拥有了它,只需发出以下命令即可对应用包进行代码签名并启用沙盒使其成为权利的一部分:
Once you have it, simply issue this command to code-sign your app bundle and enable sandboxing, by making it part of the entitlements:
codesign -s - -f --entitlements /path/to/entitlement.plist /path/to/YourApp.app/
如果您已经使用证书进行代码签名,只需替换' - s - '上面有'-s第三方Macintosh开发者...并使用您的开发人员证书。
If you already code-sign with a certificate, just replace '-s -' above with '-s "3rd Party Macintosh Developer..." and use your developer certificate.
这篇关于如何在没有XCode的情况下构建沙盒应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!