Runtime access to 3rd party app's Suite defs.


Does anyone know if it’s possible to use a system framework to access the suite definitions for any running app? I know I can parse the sdef file in the app’s bundle, but I’d rather query the system directly, if that’s even possible. Anyone had any experience with this?


Model: MacBook Air
Browser: Safari 605.1.15
Operating System: macOS 10.14

OSAKit.framework has an undocumented OSADictionary class that can be used:

use framework "Foundation"
use framework "OSAKit"
use scripting additions

set thePath to "/Applications/Some"
set {theDict, theError} to current application's OSADictionary's alloc()'s initWithContentsOfFile:thePath |error|:(reference)
theDict's parse()
set {theDoc, theError} to current application's NSXMLDocument's alloc()'s initWithData:(theDict's |data|()) options:(current application's NSXMLDocumentTidyXML) |error|:(reference)