【发布时间】:2012-03-27 12:03:59
【问题描述】:
我正在调整 MacOS 应用程序以使用沙盒。当我尝试在控制台中使用“拒绝 mach-lookup”消息调用 CFMessagePortCreateRemote 时,它使用了一个帮助应用程序(同一个包中的一个 exe)。
我可以看到com.apple.security.temporary-exception.mach-lookup.global-name 授权密钥可以解决这个问题,但这只是暂时的。
有没有办法在沙盒应用程序中通过 mach 端口实现两个应用程序之间的通信?
错误:
let port = CFMessagePortCreateLocal(nil, "XXXYYYZZZZ.MyAppGroupName" as CFString, Callback, nil, nil)
let runLoopSource = CFMessagePortCreateRunLoopSource(kCFAllocatorDefault, port, 0)
CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, .commonModes)
*** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x14807, name = 'XXXYYYZZZZ.MyAppGroupName'
【问题讨论】:
标签: macos sandbox appstore-sandbox