But, at least so far, I could not get it to do what it should do, based on Launch Services stuff. Here are some instructions that may work for you. What did work, is to make a new app that is document-based. From that point, I basically followed Hillegass, pp. 163-165, with additional work as described below.
For a document-based application, there are two methods you must implement, for reading and writing your data. You have a choice as to which of 3 versions you use: I chose "writeToURL" and "readFromURL" as shown below.
In addition, I had to do some other things. I added an icon file to my project called "Check.icns." I bound the NSTextField found in the standard MyDocument.xib to an NSString variable for which I did @synthesize in the now familiar way.
And I modified the plist file for the application. I followed Hillegass's instructions. One thing that is weird is that the plist editor uses different identifiers in its view of the plist than are actually in the docs (or in the plist if you look with a standard text editor). Nevertheless, here is a screenshot of what I added.
These can also be set by selecting the Target and doing getInfo...
That got me going. I was able write to disk, and read from disk using the Open menu item. Open Recent also works. But double-clicking on a file icon does not.
For that, you need to do this (assuming that your doc does what mine is doing on the write).
The entire listing for MyDocument.m follows. Notice that no declarations are needed in the header (the methods are already declared in the superclass). Just
@property (retain) NSString *myData;
Now I just need to reimplement my application!