Cocoa:沙箱授权可启动其他应用程式 [英] Cocoa: Sandbox entitlement to launch another application

查看:289
本文介绍了Cocoa:沙箱授权可启动其他应用程式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在呼叫

    [[NSWorkspace sharedWorkspace] launchApplication:path];

从我的沙箱应用程序,我在控制台得到这个错误:

From my sandboxed app, and I'm getting this error in the console:


9/5/11 12:23:12.462 PM lsboxd: PATH REDACTED> for 21383 - reason -10826

9/5/11 12:23:12.462 PM lsboxd: refusing to spawn < PATH REDACTED > for 21383 - reason -10826

9/5/11 12:23:12.463 PM应用程序:spawn_via_launchd()失败,errno = 54 label = [0x0- 0x1994993] .MYApp path =< PATH REDACTED> flags = 0

9/5/11 12:23:12.463 PM App: spawn_via_launchd() failed, errno=54 label=[0x0-0x1994993].MYApp path=< PATH REDACTED > flags=0

9/5/11 12:23:12.464 PM应用程序:LSOpenFromURLSpec() PATH REDACTED>(null)。

9/5/11 12:23:12.464 PM App: LSOpenFromURLSpec() returned -10810 for application < PATH REDACTED > (null).

换句话说,我明显被Launch Services Sandbox Daemon ),它不认为应用程序1应该启动应用程序2.

In other words, I'm clearly getting blocked by the "Launch Services Sandbox Daemon" (lsboxd) which doesn't think app 1 should be launching app 2.

对于记录10826是用户没有启动应用程序的权限,然后10810是发生未知错误

For the record 10826 is "The user does not have permission to launch the application" and then 10810 is "An unknown error has occurred"

有人知道此案件的权利吗?

Does anyone know of an entitlement for this case?

从沙箱应用程序启动其他应用程序(请不要说AppleScript - 这是一个不起作用的噩梦,特别是当从沙盒应用程序或XPC服务调用时)。

How can you launch other apps from a sandboxed app (please don't say AppleScript - it's a non-functioning nightmare, especially when called from sandboxed apps or XPC services). The ideal is a way to use the (severely crippled) NSWorkspace from within a sandbox.

推荐答案

<$ c $的参数

这篇关于Cocoa:沙箱授权可启动其他应用程式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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