For instructions on how to use the PFiddlesoft Frameworks, including sample code, read or download our Assistive Application Programming Guide for Mac OS X, a detailed PDF document. The Programming Guide is also included in both framework bundles along with detailed framework references. Download the source code for our free Event Taps Testbench developer utility in the form of an Xcode 3.2 project file, to serve as example code showing how to use the PFEventTaps framework. If you have questions that aren't answered in the documentation or on this website, send email to us at email@example.com.
A Note on Security Issues Presented by Assistive Applications
Assistive applications give computer users with disabilities full access to the power and benefits of modern computer hardware and software. An assistive application running on OS X uses Apple's Accessibility and Quartz Event Taps APIs to enable the user to explore, monitor and control the computer, including other running applications, using accessibility features built into the system without requiring a mouse, a keyboard or other conventional input devices.
Assistive applications serve an important public purpose, promoted by the requirements of Section 508 of the Workforce Investment Act of 1998 regarding access to electronic and information technology for persons with disabilities. Compliance with Section 508 is a prerequisite for sale of computer and other products to the federal government and to many state agencies and educational institutions.
At the same time, the extraordinary power of the accessibility features built into OS X presents potential security issues, which Apple has addressed in a variety of ways since the Accessibility API was introduced in Mac OS X 10.2 Jaguar. Chief among Apple's security precautions, accessibility is turned off by default on all Macintosh computers. To use an assistive application, a user must deliberately enable access allowing the assistive application to monitor and control the computer using accessibility features, and authentication with an administrator password is required.
In OS X 10.7 Lion and 10.8 Mountain Lion, the user enables access globally for all applications by selecting the "Enable access for assistive devices" checkbox in Accessibility (or Universal Access) preferences. In most assistive applications, a dialog advises the user to open System Preferences, go to the indicated preferences pane, and manually select the checkbox. Some assistive applications open the preferences pane for the user, while a few others enable access for the user automatically using a relatively little-known AppleScript command, but authentication with an administrator password is still required. A very small number of assistive applications—including PFiddlesoft's UI Browser and UI Actions—use a per-application trust mechanism that is difficult to implement but as easy on the user as the AppleScript technique. It provides greater security by allowing users to leave the global access setting turned off, and authentication is still required.
Security has been tightened in OS X 10.9 Mavericks. Apple has removed the global access feature from Accessibility preferences and introduced a new per-application trust mechanism. In addition, the AppleScript technique for enabling access programmatically has been eliminated by making the relevant properties read-only. Access can now be granted only to individual assistive applications, and the user must do it manually by selecting each application's checkbox in the Privacy pane's Accessibility list in Security & Privacy preferences. The new trust mechanism is very easy for assistive application developers to implement. While it is a little more difficult for users, they do reap the benefits of increased security. The difficulty is ameliorated as much as possible by a built-in system alert that offers to open System Preferences for the user, automatically adding the assistive application to the Accessibility list and bringing it to the front so the user can select the appropriate checkbox—after authenticating with an administrator password to unlock Security & Privacy preferences.
To assist developers in adapting to the new Mavericks security mechanism, PFiddlesoft has written two free developer utilities and posted the source code here in the form of Xcode 5.0.1 projects for download. One is Accessibility Testbench and the other is PFAssistive Testbench. They are identical except that PFAssistive Testbench embeds our PFAssistive Framework and uses one of its methods, while Accessibility Testbench uses the corresponding accessibility API function and does not require PFAssistive Framework. Download either of them and study its code to learn how your assistive application can present alert sheets in Mavericks with customized wording instead of the fixed, freestanding modal alert presented by the system. In addition, learn how your assistive application can be notified and respond appropriately when the user grants or denies access in Security & Privacy preferences. Finally, both utilities include a routine that resets the Accessibility List so that developers can repeatedly test their assistive applications as if they were being launched for the first time on the computer.
The PFiddlesoft Frameworks are copyrighted software. This is a summary of the license terms. For the legally binding terms consult the licenses themselves. The licenses are embedded in the frameworks’ bundles, or download the PFAssistive Framework distribution license and the PFEventTaps Framework distribution license.
Free for Personal Use and for Distribution or Use With Free Products
The PFiddlesoft Frameworks may be licensed free of charge for personal use, including use during development of any client application or other software. They may also be licensed free of charge for distribution or use with any client application or other software that you distribute to the public free of charge (including freeware as well as free beta or trial versions of a product for which you intend to request or require payment in the future). You are required only to give notice to PreForm Assistive Technologies, LLC, to provide attribution to PreForm Assistive Technologies, LLC in your client application or other software, and to include the copyright notice and license in your client application or other software.
One-Time License Fee for Distribution or Use With Paid Products
If you distribute or use the PFiddlesoft Frameworks with a client application or other software product for which you request or require payment, or if you distribute a client application or other software product that includes or uses the PFiddlesoft Frameworks for which you request or require payment, such as donationware, shareware, and commercial applications, or for internal use within a for-profit organization, you must within thirty days of initial distribution of your product pay PreForm Assistive Technologies, LLC a flat one-time license fee of $250 U.S. for each framework that you distribute or use, regardless of the number of units of your product you distribute or use. This fee covers all present and future versions of your product, but any separate and distinct product requires you to pay PreForm Assistive Technologies, LLC an additional license fee of $250 U.S. for each framework that you distribute or use, as described above.
An executed license is required both for free distribution or use, and for distribution or use subject to a flat one-time license fee with a product for which you request or require payment. Download the PFAssistive Framework distribution license or the PFEventTaps Framework distribution license or both of them, depending on which of the PFiddlesoft Frameworks you distribute or use. Then print the licenses in duplicate, fill in the blanks, sign them, and mail them to:
PreForm Assistive Technologies, LLC
P.O. Box 326
Quechee, VT 05059-0326
DIFFERENT TERMS APPLY TO LARGE OR ESTABLISHED COMMERCIAL SOFTWARE DEVELOPERS. The source code is available for an additional fee. Contact us at firstname.lastname@example.org for details.
The PFiddlesoft Frameworks are provided on an "AS IS" basis. The following disclaimers apply to each of the frameworks:
PREFORM ASSISTIVE TECHNOLOGIES, LLC MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE FRAMEWORK OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH OTHER PRODUCTS. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED.
IN NO EVENT SHALL PREFORM ASSISTIVE TECHNOLOGIES, LLC BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE FRAMEWORK, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF PREFORM ASSISTIVE TECHNOLOGIES, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOUR REMEDY FOR ANY DEFECT OR FAULT IN THE FRAMEWORK IS LIMITED TO REFUND OF THE LICENSE FEE YOU PAID.
This page was first published by PFiddlesoft on May 25, 2010. Last updated November 3, 2013.
Copyright © 2003-2013 Bill Cheeseman. Used by permission. All Rights Reserved.
PFiddlesoft, PFiddle Software, Pfiddle, Pfiddles, and the PFiddlesoft logo are trademarks of PreForm Assistive Technologies, LLC.