沙盒化后,Accessibility API停止工作 [英] Accessibility API stops working after sandboxing

查看:113
本文介绍了沙盒化后,Accessibility API停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Mac App使用可访问性API移动(其他应用程序的)调整大小窗口。

My Mac App uses accessibility API to move an resize window (of other apps).

我想将我的应用提交到MAS(Mac App Store)。我已经读过,必须向MAS提交应用才能打开沙箱。

I would like to submit my app to the MAS (Mac App Store). I have read that to submit an app to the MAS is mandatory to turn on sandboxing.

当我打开沙箱时,我的代码无法通过可访问性API找到聚焦的窗口(总是返回NULL)。问题是:可访问性API不能与沙盒一起使用吗?

When I turn on the sandboxing my code can´t find the focused window through the accessibility API (always return NULL). The question is: the accessibility API can´t be used with sandboxing?

我注意到Mac App Store中有一些使用可访问性API的应用程序,不是强制性沙盒

I notice that there are applications in the Mac App Store that uses accessibility API, is not mandatory sandboxing by now?

预先感谢。

推荐答案

首先,作者: 三月 2012年6月,根据我发现的研究结果,Mac Apple Store上的所有应用都必须安装沙盒。

First, by March June, 2012, all Apps on the Mac Apple Store will be required to be Sandboxed, from the research I've found. Not Sandboxing isn't going to future-proof your app.

第二,我发现了您可以考虑的3种策略:

Second, I've found 3 strategies that you may consider:


  1. 查找权利列表,然后查看是否可以通过权利授予应用访问权限(Apple允许应用程序特殊特权访问其需要的关键功能的方式)。 这里是苹果文档中的演练您可以堆栈跟踪丢失和可能需要的权利

  2. 向Apple提交有关您要使用的特定功能的错误请求。谁知道,他们实际上可能会更新其代码库以允许您访问。

  3. 考虑将应用程序作为产品在电子商务网站上出售,而不在Mac Apple Store上出售。人们仍然可以在常规网站上购买和安装您的应用程序(就像在使用MAS之前所做的Versions,TextMate和其他出色的应用程序一样),尤其是如果您的应用程序执行的操作无法在MAS上找到。

  1. Look up the list of entitlements, and see if you can grant your app access via the Entitlements (Apple's way of allowing Apps special privileges to access key features they'lll need). Here's a walk-through via Apple's documentation on how you can stack-trace through which entitlements you're missing and might need.
  2. Submit a bug request to Apple on the specific feature you want access to. Who knows, they may actually update their codebase to allow you access.
  3. Consider selling the app as a product on an e-commerce site, and not selling on the Mac Apple Store. People can still buy and install your app on a regular website (as Versions, TextMate, and other wonderful applications have done before going on MAS), especially if your application does things that can't be found on the MAS.

如果您查看文档,会发现它明确声明您不能对辅助应用程序进行沙箱处理。

If you look at the documentation, you'll find that it explicitly states you cannot sandbox an assistive app.

这里是有关为沙箱准备应用程序的文档的摘录


在辅助应用程序中使用辅助功能API

Use of accessibility APIs in assistive apps

通过应用沙箱,您可以并且应该启用您的应用程序的可访问性,如
可访问性概述中所述。但是,您不能将诸如屏幕阅读器之类的辅助应用
沙箱化,也不能将控制
另一个应用程序的应用沙箱化。

With App Sandbox, you can and should enable your app for accessibility, as described in Accessibility Overview. However, you cannot sandbox an assistive app such as a screen reader, and you cannot sandbox an app that controls another app.

这是摘录自其有关可访问性的文档在可可中


注意:使用应用沙箱,您可以并且应该为应用启用
的访问权限,如本文档所述。但是,您不能将
沙箱作为辅助应用程序(如屏幕阅读器),也不能将
沙箱用于控制其他应用程序的应用程序。

Note: With App Sandbox, you can and should enable your app for accessibility, as described in this document. However, you cannot sandbox an assistive app such as a screen reader, and you cannot sandbox an app that controls another app.

听起来有点像是重复说话:您应该使您的应用可以可访问,但是您不能对辅助应用进行沙箱...

It sounds a bit like double-speak: you should enable your app to be Accessible however you cannot sandbox an assistant app...

这篇关于沙盒化后,Accessibility API停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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