macos 删除沙盒
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7018354/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove Sandboxing
提问by user610246
I have another question dealing with app sandboxing. So I need access to the users' home directory and at the same time the app should be able to shut down the Mac. This requires to not using sandboxing.
我还有一个关于应用沙盒的问题。所以我需要访问用户的主目录,同时应用程序应该能够关闭 Mac。这要求不使用沙箱。
My problem is that I don't know how to remove sandboxing and being able to submit the app to the Mac App Store. I think that the archives are sandboxed because I had turned it on once..
我的问题是我不知道如何删除沙箱并能够将应用程序提交到 Mac App Store。我认为档案是沙盒的,因为我曾经打开过它..
How to remove sandboxing from the archives properly?
如何正确地从档案中删除沙箱?
Thanks for your help!
谢谢你的帮助!
回答by Eric
回答by sbooth
If I understand what you are asking correctly, you'll need to remove the entitlements.plist from your project and make sure that the Summaryview of your target in Xcode has sandboxing turned off:
如果我理解您的要求是正确的,您需要从项目中删除 entitlements.plist 并确保Xcode 中目标的摘要视图已关闭沙箱:
回答by spud
As Derek Wade pointed out, you can make an App like GarageBand X (which behaves obnoxiously with third party plugins like Amplitube due to Sandboxing) NOT run in a sandbox by editing the binary itself with a HEX editor like HexFiend. Look for:
正如 Derek Wade 指出的那样,您可以通过使用 HexFiend 之类的十六进制编辑器编辑二进制文件本身来制作像 GarageBand X 这样的应用程序(由于沙盒,它与 Amplitube 等第三方插件的行为令人讨厌)不在沙箱中运行。寻找:
<key>com.apple.security.app-sandbox</key>
Immediately following that bit you'll see the true tag, which as suggested I switched to 'fals' (no extra bytes) and now GarageBand will happily interact with third party VST plugins. Huzzah.
紧接着你会看到真正的标签,正如我建议的那样,我切换到“fals”(没有额外的字节),现在 GarageBand 将愉快地与第三方 VST 插件交互。哈扎。
回答by Derek Wade
I found if you go into the .app package, under Contents/MacOS, there should be a binary file that matches the name of your app. Copy that file to your desktop. Edit the desktop copy of the file with TextEdit. You should find within the file, the text representation (xml) of the Entitlements for the app. Find the Sandbox entitlement flag (usually set to <true/>) and change it to <false/>. You will have to unlock the file when editing. Save the file (located on the desktop). Rename the original file in the .app package (i.e. append .old to the filename). Copy the desktop file back to the .app Package location (you may have to authorize it). This should remove the sandboxing.
我发现如果你进入 .app 包,在 Contents/MacOS 下,应该有一个与你的应用程序名称匹配的二进制文件。将该文件复制到您的桌面。使用 TextEdit 编辑文件的桌面副本。您应该在文件中找到应用程序权利的文本表示 (xml)。找到 Sandbox 授权标志(通常设置为 <true/>)并将其更改为 <false/>。编辑时您必须解锁文件。保存文件(位于桌面上)。重命名 .app 包中的原始文件(即在文件名后附加 .old)。将桌面文件复制回 .app 包位置(您可能需要对其进行授权)。这应该删除沙箱。
回答by Mark Segal
You cannot remove Sandbox if the user ran you application via Sandbox.
That's the whole point - don't you think ?
如果用户通过 Sandbox 运行您的应用程序,则您无法删除 Sandbox。
这就是重点——你不觉得吗?