I'm trying to implement AppleScript support in an Application that I'm writing for macOS (or, more accurately, updating - It's an Objective C application). The sdef file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="FileDump">
<suite name="FileDump Suite" code="FLDS" description="File Dump Scripts">
<command name="List" code="lflecont" description="List file types found in data stream">
<cocoa class="ListDataContentCommand"/>
<result type="any" description="an array containing the types of all the data blocks in the File"/>
</command>
<command name="Get" code="gflecont" description="Get contents of Data Object">
<cocoa class="GetFLEItemCommand"/>
<direct-parameter type="text" description="The Data Object to get"/>
<result type="any" description="a data object containing the requested item"/>
</command>
</suite>
</dictionary>
I've updated the info.plist as described in this answer.
If I set NSAppleScriptEnabled to false then Script Editor says that my application isn't scriptable (as you'd expect), but my application responds to the standard suite (open document, for example).
If I set NSAppleScriptEnabled to true then Script Editor shows the dictionary for my application correctly, but my application no longer responds to the standard suite - trying to open a document times out.
My application is NSDocument based. What am I doing wrong? How can I make my application scriptable and have it respond to the standard suite as well?